DayPilot.Menu.show

The show() method displays the context menu.

Declaration

DayPilot.Menu.show(target)

Parameters

  • target - the target object - usually DayPilot.Event object (representing an event)

You will be able to access the target 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"});