Completed
Last Updated: 06 Dec 2024 12:20 by ADMIN
Release 2025 Q1 (Feb)
Lasse
Created on: 26 Nov 2024 10:42
Category: DateTimePickers
Type: Bug Report
0
Picker TagHelpers do not set the value in conjunction with the "for" and "value" attributes.

### 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]

2 comments
ADMIN
Mihaela
Posted on: 06 Dec 2024 12:20

Hello Lasse,

The bug has the status "Completed" because it is fixed, and the fix will be available in the upcoming 2025 Q1 release in February.

Regards,
Mihaela
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Lasse
Posted on: 06 Dec 2024 08:32
I'm not quite sure I understand why the bug has been closed? Do you not see it as a fixable bug - or is the use for TagHelpers for that control obsolete?