DayPilot.Menu.show

The show() method displays the context menu.

Declaration

DayPilot.Menu.show(source)

Parameters

  • 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).

Example

const menu = new DayPilot.Menu({
  items: [
    { 
      text: "Details", 
      onClick: (args) => { alert("Name: " + args.source.name); }
    }
  ]
});

menu.show({name: "Object name"});