I want to update my json in fullcalendar, Here is what I am exactly trying to do. I have a JSON string which I am directly trying to feed in to the event objects in the full ca
You aren't calling the correct fullCalendar method to render the new events.
This will not work because it is only meant to render the events the first time around:
$("#demo-calendar").fullCalendar('renderEvents', JSON);
Instead you need to remove the events on the calendar and refresh them:
$("#demo-calendar").fullCalendar('removeEvents');
$("#demo-calendar").fullCalendar('addEventSource', JSON);
Check the Fiddle: http://jsfiddle.net/shaunp/u8Ksw/29/
NOTE that there is a fullCalendar method called refetchEvents
, but that it does NOT work on an array of events such as what you have created, so you must manually take the events off and re-add the event source again.
You need to add the following lines:
$("#demo-calendar").fullCalendar('removeEvents');
$("#demo-calendar").fullCalendar('addEventSource', JSON, true);
When adding new events to the calendar they can disappear when switching months. To solve this add stick: true
to the event object being added to the scope.