I have the following code in a page on which I am using fullCalendar. I am able to add events in my page, however the calendar does not display this dynamically. I have to move to another month (and then back to the current month), before the dates I added are displayed.
Is there a way to dynamically refresh/render the calendar as dates are programatically added to it?
Here is a snippet of my code so far:
## the code for generating the calendar
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
editable: false,
events: 'http://example.com/getevents.php',
});
});
</script>
<h1>Calendar Test</h1>
<div id='calendar'></div>
## the code for updating it
$('#calendar').fullCalendar( 'refetchEvents' );