TelerikDatePicker automatically changes to current year

0 Answers 93 Views
DateTimePicker
George
Top achievements
Rank 1
George asked on 29 Nov 2023, 11:25 PM

I am trying to perform the following in a Blazor app. Default value = DateTime.Now. When a user enters a MMddyy or  MMddyyyy I want to automatically format  the date to MM/dd/yyyy. But I'm having an issue where the control automatically formats back to the default date value. Below is my layout for the DatePicker. I've tried different variations based on the demos Telerik provides but no luck. Hope someone can help. Thanks!

 

<TelerikDatePicker Id="@CustomComponent.FieldLabel"
                  @bind-Value="theInputValue"
                  Enabled="CustomComponent.IsEnabled"
                  Format="MM/dd/yyyy"
                  OnChange="@OnValueChanged"
                  OnBlur="@OnControlBlur">
</TelerikDatePicker>

No answers yet. Maybe you can help?

Tags
DateTimePicker
Asked by
George
Top achievements
Rank 1
Share this question
or