DayPilot.Scheduler.onTimeRangeSelect

The onTimeRangeSelected event is fired when a user selects a date/time range using drag and drop in the JavaScript Scheduler component.

This event is fired before the default action specified using timeRangeSelectedHandling property. You can use args.preventDefault() to stop further processing of the event (it will prevent the default action and onTimeRangeSelected).

See also onTimeRangeSelecting event which is fired when the drag and drop selecting is in progress (whenever the selection changes).

Declaration

DayPilot.Scheduler.onTimeRangeSelect(args)

Parameters

  • args.start - start of the selection (DayPilot.Date object)

  • args.end - end of the selection (DayPilot.Date object)

  • args.multirange - an array of selections (if multi-range selection is enabled); each item has start, end, and resource properties

  • args.origin ("click" | "drag" | "api" | "keyboard") - origin of the event; "click" is used if the users clicks a grid cell without dragging; available since 2023.4.5803

  • args.resource - ID of the selection resource (string or number)

  • args.preventDefault() - prevents the default action and onTimeRangeSelected

Notes

Not available in api=1 mode.

See Also