OnCalendarViewChanged
The OnCalendarViewChanged client-side event handler is called when the calendar navigates to a new view, after the calendar has been updated for the new view. The event is raised after the action is complete.
The event handler receives two arguments:
the RadCalendar object that fired the event.
an event arguments object that exposes the following methods:OnCalendarViewChanged event arguments object
Name | Return Type | Arguments | Description |
---|---|---|---|
get_step() | int | Returns the number of views by which the calendar has changed. |
The following example uses the OnCalendarViewChanged event to display an alert:
<telerik:RadCalendar RenderMode="Lightweight" ID="RadCalendar1" runat="server">
<ClientEvents OnCalendarViewChanged="viewChanged" />
</telerik:RadCalendar>
function viewChanged(sender, eventArgs) {
var step = eventArgs.get_step();
var msg = "The calendar moved ";
if (step < 0) {
msg = msg + "back ";
step = -step;
}
else
msg = msg + "forward "
msg = msg + step + " views.";
alert(msg);
}