See https://docs.telerik.com/blazor-ui/components/dateinput/supported-formats#two-digit-year-formats
I am using a 4-digit format as workaround, but 2-digit formats are quite normal over here. That is why most tools and OS-es have cutoff years. Often a floating cutoff year that is 50 years before the current date. So anything below 70 would be 20xx. Or you can have a cutoff year close to a century ago, because you consider dates past more relevant than future dates.Currently, if the component has DebounceDelay and loses focus before the delay has passed, the Blur event is fired before the ValueChanged event.
This bug extends to DateInput, DatePicker, DateTimePicker, and DateRangePicker
If you use the FloatingLabel, when you tab into the DateInput control, the cursor is set at the very end of the text of the date format. However, if you do not use the FloatingLabel, and you tab into the DateInput control, the placeholder text is selected.
Reproduction: https://blazorrepl.telerik.com/wQlvclOZ14jEKaXU38.
===
ADMIN EDIT
===
The report is initially opened for DateInput, however, it also targets the rest of the date pickers that are compatible with FloatingLabel.
Hello,
Please add an AutoComplete parameter for the DateInput and the date/time pickers, so that browser auto-fill behavior can be controlled or even disabled, if it works incorrectly.
If you use the format "yyyy-MM-dd" type in a full value and go back to change the year part the focus changes to the month part.
For example enter 2022-01-10 and then go back with the mouse to the year part. Type in 20. The focus then changes to the month part before completing the year part.
This happens with other formats as well when you use MM. The leading zero seems to screw things up. If you play around with the control and changing stuff you will notice that the focus function does not work.
https://blazorrepl.telerik.com/GckPEjFb19imr0x607
Create the WebAssembly CRUD example from the New Project Wizard and go to the Form page.
Type a year in the date picker. Do not remove the focus and type another year. After doing this a few times the input visibly lags and the form becomes slow.
---
ADMIN EDIT
A potential workaround could be to disable the pointer events so that the users will have a harder time focusing the input so they are more likely to use the drodown to choose dates:
.k-datepicker .k-dateinput input {
pointer-events: none;
}
<TelerikDatePicker Value="@person.StartDate"
OnChange="@( (object dt) => person.StartDate = (DateTime)dt )"
ValueExpression="@( () => person.StartDate )"
Width="100%" Id="StartDateDP">
</TelerikDatePicker>
---
Recreational steps:
1. Typed "05"
2. Typed "right arrow" (select month part)
3. Typed "03"
4. Typed "right arrow" (select year part)
5. Tried typing "2020"... but as you can see things went strangely.
Binding a date input or a date picker to a nullable value causes a build-time error
error CS1503: Argument 1: cannot convert from 'System.DateTime?' to 'System.DateTime'
Sample:
@using Telerik.Blazor.Components.Button