DayPilot.Calendar.onEventDelete

The onEventDelete event fires when the user clicks the event delete icon in the upper-right corner. The "delete" icon is only visible if you enable event deleting using eventDeleteHandling property of the calendar.

This event is fired before the event is actually removed from the calendar. You can cancel the removal using args.preventDefault(). See also the onEventDeleted event which is called after the event is removed.

Declaration

DayPilot.Calendar.onEventDelete(args);

Parameters

  • args.e (DayPilot.Event) - the event reference
  • args.preventDefault() - cancels the default action

Example

dp.onEventDelete = function(args) {
  if (args.e.id() === "3") {
    args.preventDefault();
  }
};

api=1

Declaration

onEventDelete(e)

Parameters