0

I have to use fullCalendar.

The problem is my event's end date is 28-11-2019 but in the calendar it displays as 27-11-2019.

What is the solution?

<script>
$(document).ready(function () {
  var calendar = $('#calendar').fullCalendar({
    editable: false,
    events: "php/fetch-event.php",
    eventOrder:('-batch'),
    displayEventTime: false,
    eventRender: function (event, element) {
      if (event.batch  === 'morning') {
        element.css('background-color', '#7cbfe5');
      } 
      else  {
        element.css('background-color', '#9fe78d');
      }
    },
  });
});  
</script>
ADyson
  • 57,178
  • 14
  • 51
  • 63
  • 1
    Possible duplicate of [Fullcalendar end date wrong by one day](https://stackoverflow.com/questions/27407052/fullcalendar-end-date-wrong-by-one-day) – Khurram Ishaque Nov 28 '19 at 10:43
  • There is already a long discussion on this topic : https://github.com/fullcalendar/fullcalendar/issues/3679 – Khurram Ishaque Nov 28 '19 at 10:55
  • In addition to the above, did you read the part of the documentation where it explains that end dates are **exclusive**? See https://fullcalendar.io/docs/v3/event-object – ADyson Nov 28 '19 at 11:16

0 Answers0