Fullcalendar popover为空(使用eventLimit)

Fullcalendar popover is empty (using eventLimit)

本文关键字:eventLimit 使用 popover 为空 Fullcalendar      更新时间:2023-09-26

我一直在试图理解为什么当我单击"+x事件"时弹出窗口显示为空。

我创建了一个jsfiddle,在其中我复制了错误。我使用调试模板作为这个测试的基础。

$('#calendar').fullCalendar({
    eventLimit: 5, //or any truthy value
    ...
});

看了更多之后,我发现了它。在2.1.1版中使用fullCalendar时,必须使用矩对象设置开始(和/或)结束。然后事件出现在弹出窗口中。

声明事件的正确方式:

events: [
    {   
        start:moment('2014-11-06 22:00','YYYY-MM-DD HH:mm'),
        end:moment('2014-11-06 23:00','YYYY-MM-DD HH:mm'),
        title:'Test',
        allDay:false
    }]