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).




  • 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.resource - ID of the selection resource (string or number)
  • args.preventDefault() - prevents the default action and onTimeRangeSelected


Not available in api=1 mode.

See Also