Skip to content Skip to sidebar Skip to footer

Why Does FullCalendar Renders This Event As Single Day Event?

This is JSON representation of event: 'id' : 253, 'title' : '16-17', 'allDay' : true, 'start' : '2015-04-16T00:00:00.000+03:00', 'end' : '2015-04-17T00:30:00.00

Solution 1:

None of the automated tests in the current version of FullCalendar appear to cover the case in which the start and end dates include times AND the allDay option is set.

Documentation indicates that end dates are exclusive. I strongly suspect that what is happening is that with allDay : true, fullCalendar is stripping the times off of the start and end dates and treating them as T00:00:00. At that point, your event has a start time of 2015-04-16T00:00:00.000 and an end time of 2015-04-17T00:00:00.000, which matches the behavior you're seeing. In fact, if you omit the times from your data and give it:

start: '2015-04-16',
end: '2015-04-17'

it produces a one-day event.

It looks like if you want your event to span two days, you'll need to 'round up' your end time to the beginning of the next day.


Post a Comment for "Why Does FullCalendar Renders This Event As Single Day Event?"