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

boc*_*ode 4 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'}]

有几个像上面这样的事件(我为了简洁而删除了).

因此,上述事件出现在月份视图中,但在周或日视图中神秘地缺席.

这里有什么问题?

提前感谢您的回答.

gra*_*uts 17

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

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

或者将allDayDefault设置为false:

$('#calendar').fullCalendar({
    ...
allDayDefault: false,
    ...
});
Run Code Online (Sandbox Code Playgroud)


小智 11

确保您没有在溢出设置为隐藏的表上的任何类.我犯了这个错误,浪费了时间.

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