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

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

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