Events
The Calendar exposes Change()
and Navigate()
events that you can handle.
For a complete example on basic Calendar events, refer to the demo on using the events of the Calendar.
Handling by Handler Name
The following example demonstrates how to subscribe to events by a handler name.
@(Html.Kendo().Calendar()
.Name("calendar")
.Events(e => e
.Change("calendar_change")
.Navigate("calendar_navigate")
)
)
<script>
function calendar_navigate() {
// Handle the navigate event.
}
function calendar_change() {
// Handle the change event.
}
</script>
Handling by Template Delegate
The following example demonstrates how to subscribe to events by a template delegate.
@(Html.Kendo().Calendar()
.Name("calendar")
.Events(e => e
.Change(@<text>
function() {
// Handle the change event inline.
}
</text>)
.Navigate(@<text>
function() {
// Handle the navigate event inline.
}
</text>)
)
)