How do I delete this event from FullCalendar?

前端 未结 6 1225
轻奢々
轻奢々 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:32

    Even simpler:

    eventClick: function(calEvent, jsEvent, view) {
        $('#calendar').fullCalendar('removeEvents', function (event) {
            return event == calEvent;
        });
    }
    

提交回复
热议问题