DayPilot.Row.events.forRange

The events.forRange() method returns an array of events displayed by the JavaScript Scheduler component that overlap the specified time range.

You can use this method to find events that are displayed in a Scheduler cell or in a custom range.

Declaration

DayPilot.Row.events.forRange(start, end)

Parameters

  • start (DayPilot.Date or string in ISO 8601 format) - start of the range

  • end (DayPilot.Date or string in ISO 8601 format) - end of the range

Return Value

Returns an array of DayPilot.Event objects.

Notes

The result includes events that overlap the specified date/time range by at least one millisecond.

To get the DayPilot.Row object that represents a Scheduler row, use the DayPilot.Scheduler.rows.find() method.

Example

const dp = new DayPilot.Scheduler("dp", {
  // ...
});
dp.init();

const events = dp.rows.find("R1").events.forRange("2023-01-10T00:00:00", "2023-01-15T00:00:00");

See Also

DayPilot.Row Class

DayPilot.Scheduler.rows.find()

DayPilot.Row Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript