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