I’m using JSON event source in my code. How can I switch ‘evenDatasource’ on existing calendar? Idea behind is to add switch to page to allow user to select calendar data source without the reload. I just need to switch eventSource on-fly. How can I do it?
$(‘#calendar’).fullCalendar({
eventSources: [ // your event source { url: '/myfeed.php', // use the `url` property color: 'yellow', // an option! textColor: 'black' // an option! } // any other sources... ]});
Check out events as functions. If your switch calls
.fullCalendar( 'refetchEvents' )on change and your event function reads what events to fetch from the switch you should be fine.