Planned
Last Updated: 09 Jun 2026 14:15 by ADMIN
Scheduled for 2026 Q3 (Aug)
Christian
Created on: 09 Jun 2026 12:13
Category: DateInput
Type: Bug Report
1
Value clears on focus when AutoCorrectParts=false and value is set in OnInitializedAsync()

The DateInput value disappears on focus when it is set with an async operation in OnInitializedAsync and AutoCorrectParts is false. Potentially related to Cannot select new DatePicker value from the Calendar when AutoCorrectParts is false

Test page with a workaround:

https://blazorrepl.telerik.com/cKkUaDbm09LYyPvg11

<p> The DateInput Value is: @DateValue </p>

@if (ShouldRenderDateInput)
{
    <TelerikDateInput @bind-Value="@DateValue"
                    Format="dd/MM/yyyy"
                    AutoCorrectParts="false"
                    Width="200px" />
}
@* the else block is optional to prevent delayed component appearance *@
else
{
    <TelerikDateInput @bind-Value="@DateValue"
                    Format="dd/MM/yyyy"
                    AutoCorrectParts="false"
                    Width="200px" />
}

@code {
    private DateTime? DateValue { get; set; }
    private bool ShouldRenderDateInput { get; set; }

    protected override async Task OnInitializedAsync()
    {
        await Task.Delay(200);
        DateValue = new DateTime(2026, 06, 22);
        ShouldRenderDateInput = true;
    }
}

0 comments