DayPilot.Calendar.selectTimeRange

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 a DayPilot.Date instance or an ISO string

  • end (DayPilot.Date or string) - selection end as a DayPilot.Date instance or an ISO string

  • resource (string or number) - optional selection resource ID

  • dontFireEvent (boolean) - optional flag that prevents onTimeRangeSelect and onTimeRangeSelected from firing when set to true

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

DayPilot.Calendar Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript