search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

preventDefault() on DayPilot.Scheduler.onTimeRangeSelecting

Asked by Leo
20 days ago.

Hi there,

It would be great to have a way of disabling/aborting time range selection on the Scheduler on an individual basis.

The DayPilot.Scheduler.onTimeRangeSelect has a preventDefault() function. It would be great if there was a flexible way to also disable the selection earlier so that the time range selection does not appear.

(I only found options like timeRangeSelectedHandling = “Disabled” which generally disable the selection, however I would love to be able to control the selection individually per row, for example.)

Cheers
Leo

Answer posted by Dan Letecky [DayPilot]
19 days ago.

Hi Leo,

This can’t be done in onTimeRangeSelecting, but you can use onGridMouseDown instead. This event is fired on mouse down, before any action is performed. You can cancel time range selecting there by setting args.action to "None".

Since version 2025.4.6746 (see the latest sandbox build), this event provides details about the target cell (args.row, args.start, args.end).

New Reply
This reply is
Attachments:
or drop files here
Your name (optional):