【问题标题】:FullCalendar: all day slot not showing up in agendaDay viewFullCalendar:全天时段未显示在议程日视图中
【发布时间】:2011-07-01 11:31:01
【问题描述】:

我在我的 MVC 应用程序中使用 FullCalendar。它工作得很好,除了一件烦人的小事。全天时段不会显示在议程日视图中。它在议程周中显示得很好,但在议程日中却没有。我在 Firebug 中检查了它,并且没有呈现全天插槽的 tr。这个应用程序使用了很多 .js 文件(我没有写过),并且操作日历的文件在 .fullcalendar 调用中包含以下代码(除其他外):

            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);
                }
            },

这可能是全天时段未呈现的原因吗?我应该如何更改它以显示插槽?我对 JavaScript 和 jQuery 的了解有限,因此非常感谢任何帮助。

谢谢。

【问题讨论】:

  • 其实这个功能没有任何作用。尝试删除它,它仍然不会显示。想想 firstHour 也不起作用。我的日历从午夜开始显示,而不是从早上 6 点开始。

标签: fullcalendar


【解决方案1】:

修复它。在代码深处的某个地方调用了隐藏具有指定类的元素。它隐藏了议程日的标题。 但是 firstHour 仍然不起作用。顺便说一句,这是全日历 1.4.5。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多