DateTimePicker HtmlHelper Overview

The Telerik UI DateTimePicker HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI DateTimePicker widget.

The DateTimePicker allows the user to select a value from a calendar, a time drop-down list, or through direct input.

Initializing the DateTimePicker

The following example demonstrates how to define the DateTimePicker by using the DateTimePicker HtmlHelper.

The DateTimePicker copies any styles and CSS classes from the input element to the wrapper element.


Functionality and Features


You can subscribe to all DateTimePicker events. For a complete example on basic DateTimePicker events, refer to the demo on using the events of the DateTimePicker.

The following example demonstrates how to subscribe to events by a handler name.

      .Events(e => e
    function datetimepicker_open() {
        // Handle the open event.

    function datetimepicker_close() {
        // Handle the close event.

    function datetimepicker_change() {
        // Handle the change event.

Referencing Existing Instances

To reference an existing DateTimePicker instance, use the configuration option. Once a reference is established, use the DateTimePicker client-side API to control its behavior.

The following example demonstrates how to access an existing DateTimePicker instance.

  // Place the following after your DateTimePicker for ASP.NET MVC declaration.
  $(function() {
  // The Name() of the DateTimePicker is used to get its client-side instance.
      var datetimepicker = $("#datetimepicker").data("kendoDateTimePicker");

See Also

In this article
Not finding the help you need? Improve this article