I\'m loading dynamic events from a JSON source, but each time I click a different room, I want to clear all the events prior to fetching the new ones
I have attempte
You can call removeAllEvents function to delete all event without refreshing the whole page :
document.addEventListener('DOMContentLoaded', function () {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {/*OPTIONS*/});
$('#button').on('click', function () {
calendar.removeAllEvents();
});
});