DayPilot.Scheduler.onEventMove

This event is fired after the user finishes event moving (on drop) but before the default action (see eventMoveHandling) is performed.

Declaration

onEventMove(args)

Parameters

  • args.e
  • args.newStart
  • args.newEnd
  • args.newResource
  • args.external
  • args.ctrl
  • args.shift
  • args.meta
  • args.position - see event position
  • args.preventDefault() - cancels the default action

Example

dp.onEventMove = function (args) {
  if (args.external) {
    args.preventDefault();
    dp.message("External drop forbidden");
  }
};

api=1

In api=1 mode this event is only called if eventMoveHandling is set to "JavaScript".

Declaration

onEventMove(e, newStart, newEnd, newResource, external, ctrl, shift)

Parameters

  • e (DayPilot.Event) - the event reference
  • newStart (DayPilot.Date) - new event start
  • newEnd (DayPilot.Date) - new event end
  • newResource (string) - id of the new resource
  • external (boolean) - true if this was a move from an external source (outside of the Scheduler)
  • ctrl (boolean) - true if control key was pressed on drop
  • shift (boolean) - true if shift key was pressed on drop

DayPilot for JavaScript, ASP.NET WebForms, ASP.NET MVC, Java