1

I have training events from database and their start and end dates are in this format "YYYY-MM-DD". For example is:

{
 'title':'English Training',
 'start':'2015-05-19',
 'end':'2015-05-23'
}

But when it is rendered in calendar, it shows wrong end date enter image description here

I tried adding 12hours on endDate (*just like the answer * here) , and yes it works but now I'm unable to extend the day for an event.

I want to fix this wrong end date issue without losing the capability to extend events. Do you know any solution or hacks?

Community
  • 1
  • 1
Alex Coroza
  • 1,747
  • 3
  • 23
  • 39

1 Answers1

2

Adding 12 hours on the endDate of your event won't make it an allDay event anymore, which is why you will loose the ability to extend your event in month view.

However, adding 1 day on the endDate will work perfectly as :

  • Your event will remain an allDay event (so it will remain extendable)
  • Your endDate will become 2015-05-24 (understood by FullCalendar as 2015-05-24T00:00:00) which means that your event will end at the very first minute of 2015-05-24 which is what you want.

To conclude : if you want an allDay event to end at midnight of day1, you have to set its endDate as day2 !

C R
  • 31
  • 3