DayPilot.Menu.show

The show() method displays the context menu.

Declaration

DayPilot.Menu.show(source)

Parameters

  • source - source object, usually a DayPilot.Event object representing an event

Notes

You can access the object passed to show() in menu item onClick handlers as args.source (see DayPilot.Menu.items).

Example

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

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

See Also

DayPilot.Menu.items

DayPilot.Menu.onShow

DayPilot.Menu.hide()

DayPilot.Menu Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript