Hi all,
Heads up: please see the SO question that triggered this feature request http://stackoverflow.com/questions/29987278/fullcalendarjs-method-fullcalendarclientevents-returns-duplicate-events/
In some cases, one must reinitialize the calendar & redisplay the events that were last present in the calendar: but not via adding each single event, but rather via adding the eventSources.
I would expect a method such as: .fullCalendar('allEventSources')
This would enforce consistency with using the following methods:
.fullCalendar( 'addEventSource', source )
.fullCalendar( 'removeEventSource', source )
I could then simply do something such as:
// 1. Back up my event sources
// 2. Destroy my calendar
// 3. Create & initialize new calendar (& do all sort of fancy stuff initialization if needed)
// 4. Add the backed up event sources (see step 1) to the new calendar
var allEventSources = $('.my-calendar').fullCalendar('allEventSources'); /* [1] */
$('.my-calendar').fullCalendar('destroy'); /* [2] */
$('.my-calendar').fullCalendar(calendarOptions); /* [3] */
var arrayLength = allEventSources.length;
for (var i = 0; i < arrayLength; i++) {
$('.my-calendar').fullCalendar( 'addEventSource', allEventSources[i]); /* [4] */
}
Mergedinto: 2168