I am trying to have fullCalendar reflect changes made to a database via AJAX. The problem is that it won't update the calendar on screen after a successful AJAX call.
$.ajax({
type: "POST",
url: "eventEditXHR.php",
data: {
//the data
},
success: function(text) {
$("#calendar").fullCalendar("refetchEvents");
}....
I'm I using the wrong method? What would be the best way to accomplish this without having to reload the whole page? Thanks for any input!
There are several ways. Some less elegant.
$('#calendar').fullCalendar({ events: "json-events.php", });
Just do:
$('#calendar').fullCalendar( 'refetchEvents' );
$('#calendar').fullCalendar( 'removeEventSource', source )
$('#calendar').fullCalendar( 'addEventSource', source )