Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery:FullCalendar Plugin: Events are not shown in week view and day view but are shown in month view

I've the following code to fetch events:

$('#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'}]

There are several events like above (i've removed for brevity sake).

So the above events show up when am in the month view but mysteriously absent when am in week or day view.

What am doing wrong here?

Thanks in advance for your answers.

like image 896
bocode Avatar asked Feb 18 '10 17:02

bocode


3 Answers

I ran across this problem too. The fix was to make sure each event returned in the JSON included an "allDay" name/value pair set to false.

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

Or set allDayDefault to false:

$('#calendar').fullCalendar({
    ...
allDayDefault: false,
    ...
});
like image 50
grapenuts Avatar answered Nov 15 '22 13:11

grapenuts


Make sure that you DO NOT have any class on table that has overflow set to hidden. I made this mistake and wasted time on it.

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

like image 39
Legolas Avatar answered Nov 15 '22 11:11

Legolas


Also make sure that event length must be enough that it can be displayed in slotDuration. e.g. my slotDuration is 15 minutes, my event only displayed if it has minimum 2 minutes duration.enter image description here

like image 40
Nadir Avatar answered Nov 15 '22 11:11

Nadir