When user click on the input field of DatePicker, it either select date, or month, or year, but we want to select whole date input field like it highlights/selects whole content on Tab key.
Tried with the following code but still no luck.
<span @onfocusin="@FocusHandler">
<TelerikDatePicker @bind-Value="@SelectedDate"
Min="@Min"
Max="@Max"
Format="MM/dd/yyyy"
DebounceDelay="@DebounceDelay"
ShowWeekNumbers="true"
@ref="@DateRef">
<DatePickerFormatPlaceholder Day="day" Month="month" Year="year" />
</TelerikDatePicker>
</span>
@code {
private DateTime? SelectedDate { get; set; }
private DateTime Max = new DateTime(2050, 12, 31);
private DateTime Min = new DateTime(1950, 1, 1);
private int DebounceDelay { get; set; } = 200;
private TelerikDatePicker<DateTime?> DateRef { get; set; }
private async Task FocusHandler()
{
await DateRef.FocusAsync();
}
}
It gets selected on buttonclick though (code snippet below where it selects all content on button click) -
<TelerikButton OnClick="@FocusHandler">Focus Date</TelerikButton>
<TelerikDatePicker @bind-Value="@SelectedDate"
Min="@Min"
Max="@Max"
Format="MM/dd/yyyy"
DebounceDelay="@DebounceDelay"
ShowWeekNumbers="true"
@ref="@DateRef">
<DatePickerFormatPlaceholder Day="day" Month="month" Year="year" />
</TelerikDatePicker>
@code {
private DateTime? SelectedDate { get; set; }
private DateTime Max = new DateTime(2050, 12, 31);
private DateTime Min = new DateTime(1950, 1, 1);
private int DebounceDelay { get; set; } = 200;
private TelerikDatePicker<DateTime?> DateRef { get; set; }
private async Task FocusHandler()
{
await DateRef.FocusAsync();
}
}
Any help would be appreciated! TIA.
-Neelima
I recall being told I would have access to source code once I buy a licence.
Now that I have a licence, how do I get access to the source so I can do a local build?
I have a common scenario that my users complain about and find annoying.
1) I have a DatePicker with format of M/d/yyyy
2)They click in and (for example) quickly type 2/20/2021 expecting that to be the date, instead as soon as they hit the forward slash it jumps to the year and leaves them with 2/d/0020
3) In an attempt to fix it the user will press backspace to delete a character but that clears it all and leaves the yyyy highlighted, forcing them to stop their workflow and click back to the start and be careful not to mess anything up
This is not very user friendly. Reproducible here: Blazor DatePicker Demos - Overview | Telerik UI for Blazor
I and our users much prefer what they are used to in your Telerik Ajax tools that pops open the calendar when focusing on the box and will allow for free flow typing of a date, allowing a variety of formats on the fly and verify on leaving the field. https://demos.telerik.com/aspnet-ajax/datepicker/overview/defaultcs.aspx
Are there any workarounds or should a feature request be submitted?