New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent API for configuring the Kendo UI Calendar for ASP.NET MVC events.

Definition

Constructors

Initializes a new instance of the CalendarEventBuilder class.

C#
public CalendarEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

The Calendar event handlers.

Methods

Defines the handler of the Change client-side event. Fires when the selected date is changed.

C#
public CalendarEventBuilder Change(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

CalendarEventBuilder

Returns the current instance of CalendarEventBuilder .

Example:
C#
@(Html.Kendo().Calendar()
.Name("calendar")
.Events(events =&gt; events.Change(@&lt;text&gt;
function(e) {
// Handle the Change event inline.
}
&lt;/text&gt;)
)
)

Defines the handler of the Change client-side event. Fires when the selected date is changed.

C#
public CalendarEventBuilder Change(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Change event.

Returns:

CalendarEventBuilder

Returns the current instance of CalendarEventBuilder .

Example:
C#
@( Html.Kendo().Calendar()
.Name("calendar")
.Events(events =&gt; events.Change("onChange"))
)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Calendar is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public CalendarEventBuilder KendoKeydown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

CalendarEventBuilder

Returns the current instance of CalendarEventBuilder .

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Calendar is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public CalendarEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the KendoKeydown event.

Returns:

CalendarEventBuilder

Returns the current instance of CalendarEventBuilder .

Defines the handler of the Navigate client-side event. Fires when calendar navigates.

C#
public CalendarEventBuilder Navigate(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

CalendarEventBuilder

Returns the current instance of CalendarEventBuilder .

Example:
C#
@(Html.Kendo().Calendar()
.Name("calendar")
.Events(events =&gt; events.Navigate(@&lt;text&gt;
function(e) {
// Handle the Navigate event inline.
}
&lt;/text&gt;)
)
)

Defines the handler of the Navigate client-side event. Fires when calendar navigates.

C#
public CalendarEventBuilder Navigate(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Navigate event.

Returns:

CalendarEventBuilder

Returns the current instance of CalendarEventBuilder .

Example:
C#
@( Html.Kendo().Calendar()
.Name("calendar")
.Events(events =&gt; events.Navigate("onNavigate"))
)