DatePicker not refreshing in the UI

Hello @Team

This very specific DatePicker is not being able to refresh its value in the UI. The Change event fires with the correct value. Invoking StateHasChanged does not help. No exceptions are thrown in the console. The value is updated correctly in code.

@if (configuration is BaseConfig<DateTime> _dateTime)
{
<RadzenDatePicker @bind-Value=@(_dateTime.Value) Change=@(OnChange) Inline="true" ShowSeconds="true" ShowTime="true" ShowTimeOkButton="false" TimeOnly="true" />
}

DatePickerUIBug

Radzen.Blazor 3.11.8

Forgot to mention that BaseConfig is a simple generic type, used throughout my application. It's made for serialization of generic configurations/properties. Currently it's used as bool, int and string, only had problems with DateTime. Here's the implementation in full:

public class BaseConfig
{
    public BaseConfig() { }
    public BaseConfig(int id)
    {
        Id = id;
    }

    public int Id { get; set; }
}

public class BaseConfig<TValue> : BaseConfig where TValue : struct
{
    public BaseConfig() { }
    public BaseConfig(int id, TValue value = default) : base(id)
    {
        Value = value;
    }

    public TValue Value { get; set; }
}

Hi @kim,

Fix will be released later today.

1 Like