Completed
Last Updated: 06 Dec 2024 12:20 by ADMIN
Release 2025 Q1 (Feb)

### Bug Report

Picker TagHelpers do not set the "value" attribute in conjunction with the "for" attribute.

### Reproduction of the problem

1. Create a model with a nullable DateTime property:

         public class MyModel
         {
               public DateTime? Birthday { get; set; }
         }

2. Declare either a DatePickerFor, DateInputFor, or TimePickerFor TagHelpers and set an initial value:

        @model OrderViewModel
        <kendo-dateinput for="OrderDate" value="DateTime.Now">
          ...
        </kendo-dateinput>

3. Notice, that the value has not been assigned accordingly.

This behavior is not consistent with the HTMLHelper, as the Value() attribute is taken more predominantly when the PickerFor HtmlHelper is utilized:

@(Html.Kendo().DatePickerFor(m => m.ShippedDate)
    .Value(DateTime.Today)
)

### Current behavior

Picker TagHelpers do not set the "value" attribute in conjunction with the "for" attribute.

### Expected behavior

Picker TagHelpers should set the "value" attribute in conjunction with the "for" attribute.

### Environment

Telerik UI for ASP.NET Core version:  2024.4.1112
Browser: [all]

Unplanned
Last Updated: 18 Mar 2025 09:44 by Martin Robins
Created by: Martin Robins
Comments: 0
Category: DateTimePickers
Type: Feature Request
0

Currently, the DatePicker can be set to read-only mode by adding the "readonly" attribute through the HtmlAttributes() option or by calling the client-side readonly() method.

Is it possible to implement a built-in Readonly() option, so the DatePicker is initialized as read-only? For example:

@(Html.Kendo().DatePickerFor(m => m.StratDate)
  .Readonly(true)
)

1 2