Fullcalendar V4 - clear all events

前端 未结 4 1304
清歌不尽
清歌不尽 2020-12-21 20:55

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

4条回答
  •  失恋的感觉
    2020-12-21 21:23

    You are absolutely spot on, I'm having a particularly slow day on picking things up!

    var eventSources = calendar.getEventSources(); 
    var len = eventSources.length;
    for (var i = 0; i < len; i++) { 
        eventSources[i].remove(); 
    } 
    

    Was the solution, as you suggested @ADyson

提交回复
热议问题