我正试图在点击事件时将其删除。
这是我有的,我不知道
eventClick: function(calEvent, jsEvent, view) {
alert('Event: ' + calEvent.title);
alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
alert('View: ' + view.name);
alert('This needs to be deleted');
// change the border color just for fun
$(this).css('border-color', 'red');
$('#calendar').fullCalendar(
'removeEvents'
[this] );
},
解决方案实际上在这里:https://fullcalendar.io/docs/event_data/removeEvents/ 但我还是跟不上。 请帮忙!
最佳答案
在我的代码中,我以这种方式删除了全日历中的事件
$('#calendar').fullCalendar('removeEvents' , function(ev){
return (ev._id == calEvent._id);
})
关于javascript - 如何删除 FullCalendar 上的事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43216360/