1
votes

I have events on my fullCalendar that span for more than one day. I have the start date and end date and time. However,in my list view of the calendar, the time for the events that span for more than one day is not showing correct. My events start and end time is 8:00 a.m. to 5:00 p.m. but these events show 8:00 a.m. to 12:00 a.,m. for first day and 12:00 a.m. to 5:00 p.m. for next day.

How can I show these timings for the same event 8:00a.m. to 5:00p.m. even though the event spans for more than one dayenter image description here

1

1 Answers

0
votes

The behaviour of the calendar is correct. Your event is continuous for all that time. It starts at the start time and ends at the end time, there is no break or gap.

If you have, say, a 3-day event, and want to show it as starting at 8am and finishing at 5pm on day 1, and then the same for day 2 and day 3, then you need to provide the data to fullCalendar as 3 separate events (each with a different date, but the same start/end times).

For example

[
  {
    "Pressure Equipment Safety Legislation Seminar",
    "start": "2019-03-26 08:00",
    "end": "2019-03-26 17:00"
  },
  {
    "Pressure Equipment Safety Legislation Seminar",
    "start": "2019-03-27 08:00",
    "end": "2019-03-27 17:00"
  }
  {
    "Pressure Equipment Safety Legislation Seminar",
    "start": "2019-03-28 08:00",
    "end": "2019-03-28 17:00"
  }
]

Alternatively, depending on which version of fullCalendar you are using, you may be able to take advantage of its recurring event features (new in version 4), or in earlier versions you can implement a custom recurring event solution such as this one.