day event in the month view

How do you display a half-day event in the month view? For instance, I have an event that is 12 hours long. I would like the date cell for that event to only show a half bar. Is that possible? If so, how do you implement this?


So the events are positioned "absolute", this is a tricky one .....

Use of the eventAfterRender callback like this :

    , eventAfterRender: function(event, element, view) {
        /**
         * get the width of first day slot in calendar table
         * next to event container div
         */
        var containerWidth = jQuery(element).offsetParent()
                             .siblings("table").find(".fc-day-content").width();

        // half a day
        var elementWidth = parseInt(containerWidth / 2);

        // set width of element
        jQuery(element).css('width', elementWidth + "px");
    }

Surely can be improved :-)

链接地址: http://www.djcxy.com/p/2294.html

上一篇: 使用Visual C ++闪烁LED

下一篇: 月视图中的一天事件