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.
DayPilot.Row.events.forRange(start, end)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
Returns an array of DayPilot.Event objects.
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.
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");