DayPilot.Calendar.onEventResizing

The onEventMoving event is fired during event resizing, on every target position change. You can use it to control the resizing shadow appearance and implement custom business rules.

Declaration

DayPilot.Calendar.onEventResizing(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.onEventResizing = function(args) {
  args.top.enabled = true;
  args.top.html = "Duration: " + new DayPilot.Duration(args.start, args.end).totalHours() + " hours";
};