DayPilot.Month.onEventMove

Declaration

onEventMove(args)

Parameters

  • args.e
  • args.newStart
  • args.newEnd
  • args.ctrl
  • args.shift
  • args.position
  • args.preventDefault()

Example

dp.onEventMove = function (args) {
  if (args.newStart.getTime() > new Date().getTime()) {
    args.preventDefault();
    dp.message("Moving events to the future not allowed");
  }
};

api=1

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

Declaration

onEventMove(e, newStart, newEnd, ctrl, shift, position)

Parameters

  • e (DayPilot.Event) - the event reference
  • newStart (DayPilot.Date) - new event start
  • newEnd (DayPilot.Date) - new event end
  • ctrl (boolean) - true if control key was pressed on drop
  • shift (boolean) - true if shift key was pressed on drop
  • position (int) - position inside a day when .moveToPosition is enabled