FullCalendar: all day slot not showing up in agendaDay view

I'm using FullCalendar in my MVC app. It's working great except for one annoying little thing. The all day slot won't show up on agendaDay view. It shows up fine in the agendaWeek but not for agendaDay. I checked it in Firebug and the tr for all day slot is not being rendered. This app is using a lot of .js files (none of which I've written) and the file that manipulates the calendar has the following code in the .fullcalendar call (among other things):

            eventRender: function (event, element, view) {
                if (!event.sphere) {
                    element.removeClass("fc-event");
                    element.addClass("fc-event-business");
                }

                if (typeof (currentItem) !== 'undefined' && currentItem != null && typeof (currentEvents) !== 'undefined' && currentEvents != null) {

                    if (typeof (eventsAmount) == 'undefined' || eventsAmount == null) {
                        eventsAmount = 0;
                    }

                    currentItem++;
                    if (currentItem == 1) {

                        for (keyevent in currentEvents) {
                            if (new Date(currentEvents[keyevent].start) >= view.visStart && new Date(currentEvents[keyevent].end) <= view.visEnd) {
                                eventsAmount++;
                            }

                        }
                    }

                    if (currentItem == 1 || currentItem == eventsAmount) {

                        MyJS.SetContentHeight(false);
                        if (currentItem == eventsAmount) {
                            currentItem = 0;
                            eventsAmount = 0;
                        }
                    }
                } else {
                    MyJS.SetContentHeight(false);
                }
            },

Could this be the reason why all day slot is not being rendered? How should I change this in order to show the slot? I have limited knowledge of JavaScript and jQuery, so any help is much appreciated.

Thanks.


Fixed it. There was a call to hide the element with a specified class somewhere deep in the code. It hid the header for agendaDay. But firstHour still doesn't work. BTW it's fullcalendar 1.4.5.

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

上一篇: 跨越多个月的事件

下一篇: FullCalendar:全日制广告位未在议程日视图中显示