我有以下代码来获取事件:
$('#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'}]
上面有几个事件(为了简洁起见我已经删除了) .
因此,上述事件出现在月份视图中,但在周或日视图中神秘地缺席 .
这里有什么问题?
提前感谢您的回答 .
3 回答
确保 DO NOT 在溢出设置为隐藏的表上有任何类 . 我犯了这个错误,浪费了时间 .
table td { overflow: hidden; //Remove this to fix the issue. }
还要确保事件长度必须足以在slotDuration中显示 . 例如我的slotDuration是15分钟,我的事件仅在持续时间最短2分钟时显示 .
我也遇到了这个问题 . 修复是为了确保在JSON中返回的每个事件都包含一个设置为false的“allDay”名称/值对 .
或者将allDayDefault设置为false: