Context Menu

event-calendar-for-java-context-menu.png

DayPilot can display context menu for events and other selected elements.

Example

<script type="text/javascript">
var dpc = new DayPilot.Calendar("dpc_context_menu");
// ...
dpc.contextMenu = new DayPilot.Menu([
	{text:"Show event ID", onclick: function() {alert("Event value: " + this.source.value());} },
	{text:"Show event text", onclick: function() {alert("Event text: " + this.source.text());} },
	{text:"Show event start", onclick: function() {alert("Event start: " + this.source.start().toStringSortable());} },
	{text:"Go to google.com", href: "http://www.google.com/?q={0}"},
	{text:"CallBack: Delete this event", command: "delete"} 
]);
// ...
dpc.Init();

</script>

Online Demos

API Documentation

DayPilot for JavaScript, ASP.NET WebForms, ASP.NET MVC, Java