The selectTimeRange() method selects a Calendar time range programmatically.
Declaration
DayPilot.Calendar.selectTimeRange(start, end, [resource[, dontFireEvent]]);Parameters
start(DayPilot.Date or string) - selection start as aDayPilot.Dateinstance or an ISO stringend(DayPilot.Date or string) - selection end as aDayPilot.Dateinstance or an ISO stringresource(string or number) - optional selection resource IDdontFireEvent(boolean) - optional flag that prevents onTimeRangeSelect and onTimeRangeSelected from firing when set totrue
Notes
The selection start and end must be in the same calendar column.
Available since 2022.3.5368.
Example
dp.selectTimeRange("2022-11-01T10:00:00", "2022-11-01T12:00:00");See Also
DayPilot.Calendar.clearSelection()
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot