fullCalendar not rendering new events dynamically
Posted
by morpheous
on Stack Overflow
See other posts from Stack Overflow
or by morpheous
Published on 2010-06-04T11:55:11Z
Indexed on
2010/06/05
7:22 UTC
Read the original article
Hit count: 307
jQuery
|fullcalendar
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' );
© Stack Overflow or respective owner