19
votes

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"
});
4

4 Answers

12
votes

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'
            },
1
votes

Try using nextDayThreshold parameter:

$('#calendar').fullCalendar({
     **nextDayThreshold**: '00:00:00', // 9am

nextDayThreshold set the minimum time it must be in order for it to render as if it were on that day.

1
votes

Using parameter
nextDayThreshold: "00:00:00",

0
votes

I know this is old but it still gets a lot of views and is high up on web searches. so please see detailed answer here of my solution FullCalendar end date is not inclusive