I recently upgraded form v4 to v5 of FullCalendar. When I did this I also changed the data for my events from a static JSON object that is pulled once from the server at load to a dynamic source based on start and end dates for what the client is requesting. When I did this I lost the ability to set the slotMinTime
and slotMaxTime
because the start and end times could be different for each data pull. How can I dynamically set this after the request for the event data has been made?
Old v4 code:
datesSet: function () {
calendar.setOption("slotMaxTime", data.max);
calendar.setOption("slotMinTime", data.min);
}
Meaning when I have the data for the week of 1/10 I might have an event that starts at 9am and an event that ends at 3pm. So I'd expect my week range to start at 9am and end at 9pm. If the client then requests the week of 1/17 which has an event start at 8am and end at 1pm the week range would update to 8am and 1pm.