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

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

Definition

Constructors

Initializes a new instance of the DateRangePickerEventBuilder class.

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

The DateRangePicker event handlers.

Methods

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

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

The handler code wrapped in a text tag.

Returns:

DateRangePickerEventBuilder

Returns the current instance of DateRangePickerEventBuilder .

Example:
C#
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.Events(e=&gt;e.Change(@function(){ alert("Changed") }))
)

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

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

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

Returns:

DateRangePickerEventBuilder

Returns the current instance of DateRangePickerEventBuilder .

Example:
C#
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.Events(e =&gt; e.Change("onChange"))
)

Defines the handler of the Close client-side event. Fires when the calendar is closed

C#
public DateRangePickerEventBuilder Close(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

DateRangePickerEventBuilder

Returns the current instance of DateRangePickerEventBuilder .

Example:
C#
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.Events(e=&gt;e.Close(@function(){ alert("Closed") }))
)

Defines the handler of the Close client-side event. Fires when the calendar is closed

C#
public DateRangePickerEventBuilder Close(string handler)
Parameters:handlerstring

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

Returns:

DateRangePickerEventBuilder

Returns the current instance of DateRangePickerEventBuilder .

Example:
C#
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.Events(e =&gt; e.Close("onClose"))
)

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

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

The handler code wrapped in a text tag.

Returns:

DateRangePickerEventBuilder

Returns the current instance of DateRangePickerEventBuilder .

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

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

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

Returns:

DateRangePickerEventBuilder

Returns the current instance of DateRangePickerEventBuilder .

Defines the handler of the Open client-side event. Fires when the calendar is opened

C#
public DateRangePickerEventBuilder Open(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

DateRangePickerEventBuilder

Returns the current instance of DateRangePickerEventBuilder .

Example:
C#
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.Events(e=&gt;e.Open(@function(){ alert("Opened") }))
)

Defines the handler of the Open client-side event. Fires when the calendar is opened

C#
public DateRangePickerEventBuilder Open(string handler)
Parameters:handlerstring

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

Returns:

DateRangePickerEventBuilder

Returns the current instance of DateRangePickerEventBuilder .

Example:
C#
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.Events(e =&gt; e.Open("onOpen"))
)