New to Telerik UI for ASP.NET MVC? Download free 30-day trial

Events

The Telerik UI DateInput for ASP.NET MVC exposes an events configuration that allows you to control and customize the behavior of the component.

For a runnable example of how to handle DateInput events, refer to the demo on using the events of the DateInput.

Handling by Handler Name

The following example demonstrates how to subscribe to the Change event by a handler name.

    @(Html.Kendo().DateInput()
        .Name("dateinput")
        .Events(e => e
            .Change("onChange")
        )
    )
    function onChange() {
        // Handle the change event.
    }

Handling by Template Delegate

The following example demonstrates how to subscribe to Change event by a template delegate.

    @(Html.Kendo().DateInput()
        .Name("dateinput")
        .Events(e => e
            .Change(@<text>
                function() {
                    // Handle the change event inline.
                }
            </text>)
        )
    )

Next Steps

See Also

In this article