The onEventMoving event is fired during event moving, on every target position change. You can use it to control the moving shadow appearance and implement custom business rules.
Declaration
DayPilot.Calendar.onEventMoving(args)
Parameters
- args.e - event (DayPilot.Event object) [read-only]
- args.start - current shadow start (DayPilot.Date) [read-only]
- args.end - current shadow start (DayPilot.Date) [read-only]
- args.resource - current resource id (string | number) [read-only]
- args.html - shadow HTML (string)
- args.cssClass - shadow CSS class (string)
- args.allowed - enabled/disable drop at this position (boolean)
- args.top.width - width of the "top" text, null for auto (number)
- args.top.space - distance of the "top" text from the shadow in pixels (number)
- args.top.html - "top" HTML (string)
- args.top.enabled - enable/disabled "top" text (boolean)
- args.bottom.width - width of the "bottom" text, null for auto (number)
- args.bottom.space - distance of the "bottom" text from the shadow in pixels (number)
- args.bottom.html - "bottom" HTML (string)
- args.bottom.enabled - enable/disabled "bottom" text (boolean)
Example
dp.onEventMoving = function(args) {
args.html = "Moving '" + args.e.text() + "' to " + args.start.toString("MMMM d, yyyy @ h:mm tt");
};