20

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 Answers 4

13

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'
            },
3
  • that was a typo on my part, I had nextDayThreshold. Since all my events are fullDay the nextDayThreshold doesn't have an effect, (only on timed non-fullDay events).
    – dan
    Commented Sep 19, 2014 at 23:40
  • Yep, that's the key. My main problem is the wordpress events manager plugin on the backend. By default the EM plugin sets allDay true, with 00:00:00 time. This is "mis-understood" by fullcalendar. Thanks!
    – dan
    Commented Sep 20, 2014 at 11:22
  • 3
    Just remember that if you apply allDay to an event, nextDayThreshold is not applied. "Only affects timed events (not all-day events)." This is from the docs. Commented Sep 20, 2014 at 14:23
1

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

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

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.