Fullcalendar V4 - clear all events

前端 未结 4 1309
清歌不尽
清歌不尽 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条回答
  •  梦毁少年i
    2020-12-21 21:15

    version 5 does not support the "removeEvents" function. you can loop through the list of events and delete them one by onevar listeEvent = calendar.getEvents();listeEvent.forEach(event => { event.remove()});

提交回复
热议问题