Can somebody please give me advice on how to delete events from the FullCalendar Version 2 by dragging it out of the calendar, please?
I saw some solution here: Remove Elements from fullcalendar (by dragging to trash can)
but it seems to address the version 1.
Best Answer
My first approach would be:
This allows to drag events to the area (in pixels) corresponding to the if condition order to delete. Tested with fullcalendar 2.1.1.
An improvement would be to check and compare jsEvent coordinates with
$(window).height()
and$(window).width()
, this way would confirm/test dragging out of calendar area, much neat of course.Actually the improvement is (an elegant solution), based on the solution mentioned:
The eventDragStop is:
Tested on Fullcalendar 2.1.1