Add loading indicator to fullcalendar
3 answers
Fullcalendar V1: you have to use the function loading
triggered when you start / stop retrieving events.
$('#calendar').fullCalendar({
loading: function( isLoading, view ) {
if(isLoading) {// isLoading gives boolean value
//show your loader here
} else {
//hide your loader here
}
}
});
Fullcalendar V2: When the scheduler plugin is loaded , this callback is also triggered when resources are fetched .
+14
source to share
You can easily do this using the fullcalendar methods available.
loading - triggers when events start
eventAfterAllRender - Fired after all events have finished.
$('#calendar').fullCalendar({
loading: function (bool) {
alert('events are being rendered'); // Add your script to show loading
},
eventAfterAllRender: function (view) {
alert('all events are rendered'); // remove your loading
}
});
+4
source to share