Fullcalendar end date wrong by one day

前端 未结 10 2229
温柔的废话
温柔的废话 2020-12-06 04:42

I am making a fullCalendar backed car reservation functionality. This is the coffescript file.

    updateEvent = (event, delta, revertFunc) ->
      $.aja         


        
相关标签:
10条回答
  • 2020-12-06 04:52

    I was also facing the same and resolved it by adding "T23:59:00" to the end date i.e "end" => $end_date."T23:59:00",

    0 讨论(0)
  • 2020-12-06 04:55

    If you are setting your end date for 0 hours, min, sec, etc of 12-21-2014 there is no time in that day for an event to show.

    You may need to advance your end date to 0 hours of the next day since you have the event setup as an all day event, however uou may also be fine just advancing the time any amount (such as an hour) so that the event falls inside of the desired end date, then being an all day event it should render.

    It would be nice if their event object included a duration parameter you could set, at least I didn't see one in their documentation.

    0 讨论(0)
  • 2020-12-06 04:58

    You need to set nextDayThreshold: '00:00' and it will show the last day!

    0 讨论(0)
  • 2020-12-06 05:03

    I dont know if its still usefull, but you can use this method, add a day to your end date using :

    $date = new DateTime('2000-01-01');
    $date->add(new DateInterval('P0Y0M1DT0H0M0S'));
    

    this will increment your end date by one day.

    0 讨论(0)
  • 2020-12-06 05:03

    "Fixed" the issue by setting start and end times to the events.

    0 讨论(0)
  • 2020-12-06 05:09

    The best part is append 20:00:00 to the end date as follow:

    var ed = $("endDate").val();
    newVar = ed+" 20:00:00";
    

    Thats all you need.

    0 讨论(0)
提交回复
热议问题