DatePicker HtmlHelper bind to the model didn't have value

1 Answer 32 Views
Date/Time Pickers
Kheng Aik
Top achievements
Rank 1
Kheng Aik asked on 21 Jan 2025, 11:40 AM

For Telerik ASP.Net Core Q4 2024 release,

The following declaration, the value is not show on the component

@Html.Kendo().DatePickerFor(m => m.ContractStartDate)

However, TagHelper is working

<kendo-datepicker for="ContractStartDate">
</kendo-datepicker>

No issue in 2024 Q3 version. Kindly assist.

Thanks.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 21 Jan 2025, 09:32 PM

Hello Kheng,


Thank you for contacting us.

This issue is probably related to the following bug:
https://github.com/telerik/kendo-ui-core/issues/8053

There is also a workaround solution. Instead of using the picker with the For suffix, such as DatePickerFor(), the approach should involve utilizing DatePicker() and manually setting the Name and Value properties. Below is an example of the implementation: 
@model MyPageModel

@Html.Kendo().DatePicker().Name("MyDateProperty").Value(Model.MyDateProperty)


Do you find this information beneficial? Let me know what you think.

 

Regards,
Eyup
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.

Tags
Date/Time Pickers
Asked by
Kheng Aik
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or