I use full calendar v3 in agendaDay only, with hundreds of event per day, so I want to load only 1 day of events. At the initialization I loaded with a simple ajax call. But when I click on the next day I can't get to figure out, how to fetch that day's events.
I tried to find the next and prev day events also, to fetch the next (or prev) date to pass it to the ajax call but with no luck. Can you help me out how to solve this?
This is how it's initialized now:
$('#calendar').fullCalendar({
defaultView: 'agendaDay',
allDaySlot: false,
slotEventOverlap: false,
slotDuration: '00:15:00',
nowIndicator: true,
defaultTimedEventDuration: '00:30:00',
events: {
url: '/load_events',
type: 'POST',
success: function(event, element, view,) {
// I checked every var if it's containing useful info
},
error: function() {
alert('there was an error while fetching events!');
}
}
});
So as @ADyson highlighted, plain events in fullcalendar automatically posts start
and end
params to the url in ISO8601 format (like 2019-06-30 )
$('#calendar').fullCalendar({
events: {
url: '/load_events',
type: 'POST'
}
});