0

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.000+03:00"

FullCalendar renders it as single day event. I suspect that the problem is in timezone settings, but can't understand what exactly.

I've tried to use: ignoreTimezone: false but it didn't help.

I suppose that JSON above will render full day event from 16th to 17th (two day event).

Thank you.

UPDATE: I'm using FullCalendar v2.3.1 and there's a link to jsfiddle which reproduces this issue: http://jsfiddle.net/anatoly314/m8d68v1b/4/

Anatoly
  • 5,056
  • 9
  • 62
  • 136
  • What does the rest of your fullcalendar config look like? I put this data into a sample fullcalendar fiddle and got the behavior you say you're expecting: http://jsfiddle.net/wzwm8Lqz/ – S McCrohan Apr 19 '15 at 16:50
  • @SMcCrohan, I'm at home already will check and post tomorrow full config. Thank you! – Anatoly Apr 19 '15 at 17:20
  • @SMcCrohan, actually I've looked at your code and paid attention that you've used old version of FullCalendar 1.5.4, in a new version 2.3.1 I will be able to reproduce this issue. There's a line http://jsfiddle.net/anatoly314/m8d68v1b/4/ – Anatoly Apr 19 '15 at 17:49

1 Answers1

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.

S McCrohan
  • 6,663
  • 1
  • 30
  • 39
  • Actually It was written in the manual, I was need to read it carefully. `It is the moment immediately after the event has ended. For example, if the last full day of an event is Thursday, the exclusive end of the event will be 00:00:00 on Friday! ` What was confused me that in the old version it behaves differently and I migrate from old version to new one. Thank you. – Anatoly Apr 20 '15 at 06:18