The events.find() method finds an event in the Calendar event collection using an event id or a custom search function.
Using an event id:
DayPilot.Calendar.events.find(id)Using a custom search function (available since 2023.3.5603):
DayPilot.Calendar.events.find(f)id (string | number) - event id to look up
f (function) - predicate function that returns true when the matching event is found
Find function syntax:
function f(e) {}Find function parameters:
e (DayPilot.Event) - object to test
Returns a DayPilot.Event object, or null if no event matches. If multiple events use the same id, the first one is returned.
You can use the returned DayPilot.Event object with the client-side event API to inspect or update the matching event.
Case-sensitive search:
const query = "meeting";
const e = dp.events.find(e => e.text().includes(query));Case-insensitive search:
const query = "meeting";
const e = dp.events.find(e => e.text().toUpperCase().includes(query.toUpperCase()));Client Side Event Api [doc.daypilot.org]
Update Events without Reloading [doc.daypilot.org]