DayPilot Menu object used for time range selection context menu.
DayPilot.Calendar.contextMenuSelection (DayPilot.Menu class)
null
dp.contextMenuSelection = new DayPilot.Menu({
items: [
{
'text': 'Create new event (JavaScript)', 'onclick': function () {
dp.events.add(new DayPilot.Event({
start: this.source.start,
end: this.source.end,
text: "New event",
resource: this.source.resource
}));
}
},
{'text': '-'},
{
'text': 'Show selection details', 'onclick': function () {
alert('Start: ' + this.source.start + '\nEnd: ' + this.source.end + '\nResource id: ' + this.source.resource);
}
},
{
'text': 'Clean selection', 'onclick': function () {
dp.clearSelection();
}
}]
});