How do I delete this event from FullCalendar?

前端 未结 6 1226
轻奢々
轻奢々 2021-02-01 22:03

The calendar lets the user drag a timeslot onto the calendar, however I would like them to be able to remove it if they click on it.

So in the eventClick I have this fun

6条回答
  •  名媛妹妹
    2021-02-01 22:44

    I use filter function with event.start and it works well

    calendar.fullCalendar('removeEvents', function(event) {
      return 
        $.fullCalendar.formatDate(event.start, 'yyyyMMdd') 
        == $.fullCalendar.formatDate(start, 'yyyyMMdd');
    });
    

提交回复
热议问题