I've tried this code but it shows JS error.
eventDragStop: function(event) {
console.log(event);
console.log(event._id);
let eve = event.jsEvent;
//console.log(eve);
var trashEl = jQuery('#CalendarTrash');
var ofs = trashEl.offset();
var x1 = ofs.left;
var x2 = ofs.left + trashEl.outerWidth(true);
var y1 = ofs.top;
var y2 = ofs.top + trashEl.outerHeight(true);
if (eve.pageX >= x1 && eve.pageX <= x2 &&
eve.pageY >= y1 && eve.pageY <= y2) {
if (confirm("Are you sure to detete " + event.title + " ?")) {
//pour annuker les informations
$('#calendar').FullCalendar('removeEvents', event._id);
}
}
}
It shows error
Uncaught TypeError: $(...).FullCalendar is not a function
, event.title and event._id are blank everything else is working fine.
As per documentation it has https://fullcalendar.io/docs/v3/removeEvents it has
.fullCalendar( ‘removeEvents’ [, idOrFilter ] )
and this fullCalendar is deprecated as per this documentation https://fullcalendar.io/docs/upgrading-from-v3 now i need the syntax to remove the event on eventDragStop
info, for clarity). Did you try reading the documentation for version 4? It's not hard to find. The job of the volunteers here is not to google things or to read the docs on your behalf.... . - ADyson