The show() method displays the context menu.
DayPilot.Menu.show(source)source - source object, usually a DayPilot.Event object representing an event
You can access the object passed to show() in menu item onClick handlers as args.source (see DayPilot.Menu.items).
const menu = new DayPilot.Menu({
items: [
{
text: "Details",
onClick: (args) => {
alert("Name: " + args.source.name);
}
}
],
// ...
});
menu.show({name: "Object name"});