JQuery:FullCalendar插件:事件不会在周视图和日视图中显示,但会在月视图中显示

时间:2010-02-18 17:29:45

标签: jquery plugins fullcalendar

我有以下代码来获取事件:

$('#calendar').fullCalendar({
theme: true,
slotMinutes: 10,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay',
},
defaultView: 'agendaDay',
allDaySlot: false,
editable: false,
events: "/cgi-bin/shlk/getshlkruns.pl"
});

The output from getshlkruns.pl is fairly simple json feed:

[{'title': 'Successful','start': 1266398223,'end': 1266398266,'url': '/shlk/cgi-bin/getshlkrunlog.pl?i=21'}]

上面有几个事件(为了简洁起见,我已将其删除)。

因此,上述事件会在月份视图中显示,但在周视图或日视图中神秘地缺席。

这里有什么问题?

提前感谢您的回答。

2 个答案:

答案 0 :(得分:17)

我也遇到了这个问题。修复是为了确保在JSON中返回的每个事件都包含一个“allDay”名称/值对设置为false。

[{'title': 'Successful','allDay': false,'start': 1266398223,'end': 1266398266,'url': '/shlk/cgi-bin/getshlkrunlog.pl?i=21'}]

或者将allDayDefault设置为false:

$('#calendar').fullCalendar({
    ...
allDayDefault: false,
    ...
});

答案 1 :(得分:10)

确保不要在桌子上有任何溢出设置为隐藏的类。我犯了这个错误,浪费了时间。

table td { overflow: hidden; //Remove this to fix the issue. }

相关问题