Edit this page

DatePicker Migration

This article demonstrates the ASP.NET MVC server-side API for the Kendo UI DatePicker widget.

Server-Side API

Min Dates


    Html.Telerik().DatePicker().Name("DatePicker").MinDate(DateTime.Now)

    Html.Kendo().DatePicker().Name("DatePicker").Min(DateTime.Now)

Max Dates


    Html.Telerik().DatePicker().Name("DatePicker").MaxDate(DateTime.Now)

    Html.Kendo().DatePicker().Name("DatePicker").Max(DateTime.Now)

    Html.Telerik().DatePicker().Name("DatePicker").TodayButton(“d”)

    Html.Kendo().DatePicker().Name("DatePicker").Footer(“#= kendo.toString(data, ‘MM/dd/yyyy’)”)

ShowButton


    Html.Telerik().DatePicker().Name("DatePicker").ShowButton(false)

    Not Supported

ButtonTitle


    Html.Telerik().DatePicker().Name("DatePicker").ButtonTitle(“choose date”)


    Not Supported

OpenOnFocus


    Html.Telerik().DatePicker().Name("DatePicker").OpenOnFocus(true)

    Not Supported

DateTime.MinValue

Set the DateTime.MinValue and show nothing.


    Html.Telerik().DatePicker().Name("DatePicker").Value(DateTime.MinValue)

    Html.Kendo().DatePicker().Name("DatePicker").Value(value == DateTime.MinValue ? null : value)

Client-Side API

Events

None of the events has the On prefix anymore.

None of the widgets features the OnLoad event anymore. Use the $(document).ready() instead.

Disable


    var datePicker = $("#DatePicker").data("tDatePicker");
    datePicker.disable();

    var datePicker = $("#datepicker").data("kendoDatePicker");
    datePicker.enable(false);

See Also

To see the articles on migrating Kendo UI controls from Telerik Extensions, browse the Widgets folder.