fullCalendar multi-day event spans 1 day too short

dan picture dan · Sep 19, 2014 · Viewed 10.6k times · Source

When users add an event to the calendar, they choose start: 2014-09-17 end: 2014-09-18. Simple enough, they expect the event to extend across both the 17th and 18th boxes on the calendar, but it only appears in Sept 17th, making it appear a 1-day event.

In the events manager database 9-17 and 9-18 are entered correctly. I tried changing the nextDayThreshold option of the fullCalendar plugin, but the event still only spans across sept. 17th. I could add a day on the back end, but this causes other issues, I'd rather do it client-side, for display purposes only.

Any way to change this behavior?

thanks.

$("#cal").fullCalendar({
    events:[
        {
            'title':'test2',
            'start':'2014-09-17',
            'end':'2014-09-18'
        }
    ],
    nextDayThreshold: "00:00:00"
});

Answer

JuanCarlosV picture JuanCarlosV · Sep 19, 2014

There is no fullDayThreshold, I think you are referring to nextDayThreshold, check documentation here:

http://fullcalendar.io/docs/event_rendering/nextDayThreshold/

That should do it. Regards.

Edit: You should add time to your dates for that option to work. Example:

            {
                'title':'test2',
                'start':'2014-09-17T00:00:00',
                'end':'2014-09-18T01:00:00'
            },