The forRange() method returns an array of events displayed in a given column of the JavaScript Calendar component that overlap the specified time range.
You can use it to find events displayed in a calendar cell or in a custom range.
DayPilot.Column.events.forRange(start, end)start (DayPilot.Date or string in ISO 8601 format) - start date/time
end (DayPilot.Date or string in ISO 8601 format) - end date/time
Returns an array of DayPilot.Event objects.
The result includes events that overlap the specified date/time range by at least one millisecond.
Use columns.find() on a DayPilot.Calendar instance to get the column object for a specific column before calling this method.
const dp = new DayPilot.Calendar("dp", {
// ...
});
dp.init();
const events = dp.columns.find(DayPilot.Date.today(), "A").events.forRange(DayPilot.Date.today().addHours(10), DayPilot.Date.today().addHours(15));DayPilot.Column.events.isEmpty()