I\'ve been using FullCalendar v1.5.3 for a MS SharePoint replacement.
I\'m trying to re-render the calendar event\'s source. For instance, when the page loads by def
This is an old question but I was having a similar problem and RET's answer really helped, based on that I patched it with a counter that reset to make sure it wouldn't add duplicate event sources
count = 0;
fcSources = [wholePlan, allActivities];
//calendar initialization {
viewRender: function(view) {
if (view.name == 'agendaWeek' || view.name == 'month') {
$('#fullcal').fullCalendar('removeEventSource', fcSources.allActivities);
if (count > 0) {
$('#fullcal').fullCalendar('addEventSource', fcSources.wholePlan);
}
count = 0;
}
if (view.name == 'agendaDay' && count == 0) {
$('#fullcal').fullCalendar( 'addEventSource', fcSources.allActivities );
$('#fullcal').fullCalendar('removeEventSource', fcSources.wholePlan);
count += 1;
}
}