The hyperlink you shared provides the solution to your query:
$('#calendar').fullCalendar({
events: function(start, end, callback) {
$.ajax({
...
The "events" callback function is executed each time new events are requested. In this demonstration, the $.ajax
method from jQuery is utilized to fetch event details (refer to the ajax function). Subsequently, the "success" callback of $.ajax
processes the data retrieved from the server into a structure that FullCalendar can interpret:
$(doc).find('event').each(function() {
events.push({
title: $(this).attr('title'),
start: $(this).attr('start') // will be parsed
});
});
callback(events);
In this scenario, 'doc' represents an XML document with event components featuring titles and start attributes. It is recommended to adapt this based on the information obtained from the server. Once you have retrieved the necessary data, you have the flexibility to perform additional operations before or after transmitting it to FullCalendar (via callback(events);
as illustrated in the example)