Migrating the DatePicker Extension

To migrate the Telerik UI DatePicker Extension for ASP.NET MVC to Telerik UI for ASP.NET MVC, use the available and updated API.

  • The following example demonstrates the change when setting the min date.

    
        Html.Telerik().DatePicker().Name("DatePicker").MinDate(DateTime.Now)
    
    
        Html.Kendo().DatePicker().Name("DatePicker").Min(DateTime.Now)
    
  • The following example demonstrates the change when setting the max date.

    
        Html.Telerik().DatePicker().Name("DatePicker").MaxDate(DateTime.Now)
    
    
        Html.Kendo().DatePicker().Name("DatePicker").Max(DateTime.Now)
    
  • The following example demonstrates the change when defining the footer.

    
        Html.Telerik().DatePicker().Name("DatePicker").TodayButton(“d”)
    
    
        Html.Kendo().DatePicker().Name("DatePicker").Footer(“#= kendo.toString(data, ‘MM/dd/yyyy’)”)
    
  • The following example demonstrates the change when using the ShowButton configuration.

    
        Html.Telerik().DatePicker().Name("DatePicker").ShowButton(false)
    
    
        Not Supported
    
  • The following example demonstrates the change when using the ButtonTitle configuration.

    
        Html.Telerik().DatePicker().Name("DatePicker").ButtonTitle(“choose date”)
    
    
    
        Not Supported
    
  • The following example demonstrates the change when using the OpenOnFocus configuration.

    
        Html.Telerik().DatePicker().Name("DatePicker").OpenOnFocus(true)
    
    
        Not Supported
    
  • The following example demonstrates the change when setting the DateTime.MinValue configuration and show nothing.

    
        Html.Telerik().DatePicker().Name("DatePicker").Value(DateTime.MinValue)
    
    
        Html.Kendo().DatePicker().Name("DatePicker").Value(value == DateTime.MinValue ? null : value)
    
  • The following example demonstrates the change when using the disable event.

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

See Also

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