The events.find() method finds the specified event. To find an event, you can use its id or a custom search function.


Using event ID as a parameter:;

Using custom find function as a parameter (since version2023.3.5603):; 


  • id (string | number) - id of the event to be found 

  • f (function) - find function that returns true if the search condition is met

Find function syntax:

function f(e) {}

Find function parameters:

Return Value

DayPilot.Event object or null. If there are more events with the same id, it returns the first one.


Case-sensitive search:

const query = "meeting";
const e = => e.text().includes(query));

Case-insensitive search:

const query = "meeting";
const e = => e.text().toUpperCase().includes(query.toUpperCase()));