DayPilot.Column.events.forRange

The DayPilot.Column.events.forRange() method returns an array of events displayed by the JavaScript Calendar component in a given column that overlap the specified time range.

You can use this method to find events that are displayed in a Calendar cell or a custom range. The result will include events that overlap the specified date/time range by at least one millisecond.

To get the DayPilot.Calendar object that represents a Scheduler row, you can use the columns.find() method.

Declaration

DayPilot.Column.events.forRange(start, end);

Parameters

  • start - start date/time (DayPilot.Date or string in ISO 8601 format)

  • end - end date/time (DayPilot.Date or string in ISO 8601 format) 

Return Value

An array of DayPilot.Event objects.

Example

const dp = new DayPilot.Calendar("dp");

// ...

const events = dp.columns.find(DayPilot.Date.today(), "A").events.forRange(DayPilot.Date.today().addHours(10), DayPilot.Date.today().addHours(15));