I am trying to delete an event when it is being clicked.
This is what I have and I have no idea
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] );
},
The solution is actually here: https://fullcalendar.io/docs/event_data/removeEvents/ but I still cant follow. Please Help!
In my code I delete event in fullcalendar in that way
$('#calendar').fullCalendar('removeEvents' , function(ev){
return (ev._id == calEvent._id);
})