JavaScript Scheduler
The JavaScript Scheduler supports the following handling types (eventClickHandling):
'Enabled'(default)'Disabled''ContextMenu''Edit'(Pro only)'Select'(Pro only)'Bubble'(Pro only)
API
JavaScript Examples
This example shows how to define a custom action for Ctrl+click. Calling args.preventDefault() in onEventClick will cancel the default action specified using eventClickHandling property.
dp.onEventClick = function(args) {
if (args.ctrl) {
dp.multiselect.add(args.e); // add to selection
args.preventDefault(); // cancel the default action
}
};How to display a simple alert box:
dp.onEventClicked = function(args) {
alert("clicked: " + args.e.id());
};ASP.NET WebForms
You can assign an action to event click using EventClickHandling property.
'Disabled' (default)
'PostBack'
'CallBack'
'JavaScript'
'Edit'
'Select'
'ContextMenu'
'Bubble'
<DayPilot:DayPilotScheduler
ID="DayPilotScheduler1"
runat="server"
EventClickHandling="JavaScript"
EventClickJavaScript="eventClick(e);"
...
/>ASP.NET MVC
You can assign an action to event click using EventClickHandling property.
'Disabled' (default)
'CallBack'
'JavaScript'
'Edit'
'Select'
'ContextMenu'
'Bubble'
@Html.DayPilotScheduler("dps", new DayPilotSchedulerConfig {
BackendUrl = ResolveUrl("~/Scheduler/Backend"),
EventClickHandling = EventClickHandlingType.JavaScript,
EventClickJavaScript = "editEvent(e.value());",
...
})Availability
Availability of this feature in DayPilot editions:
| Lite | Pro | |
|---|---|---|
| DayPilot for JavaScript | ||
| DayPilot for ASP.NET WebForms | ||
| DayPilot for ASP.NET MVC | ||
| DayPilot for Java |
DayPilot