TimePicker Popup doesn't select the value If the property is of type TimeSpan and Format = "HH:mm". It works when the Format is "hh:mm"

        <SfTimePicker TValue=@TTimeSpan @bind-Value=@Value Placeholder=@Label Format="HH:mm"

                      CssClass=@CssClassName [email protected] @onfocus=@OnFocus @onkeypress=@OnKeyPress

                      @onblur=@OnBlur @bind-Enabled=@Enabled OnInput=@OnInput >

            <TimePickerEvents TValue=@TTimeSpan ValueChange=@OnDateValueChanged Selected=@OnSelected />

        </SfTimePicker>


1 Reply

PM Ponmani Murugaiyan Syncfusion Team July 5, 2021 12:34 PM UTC

Hi Boyan, 

Thanks for contacting Syncfusion support. 

As per C# TimeSpan standard, the timespan not accept the “HH:mm” format, so the reported issue is occurred. So, we suggest you to define the format as mentioned below to meet your requirement. 

@using Syncfusion.Blazor.Calendars 
 
<SfTimePicker TValue="TimeSpan" @bind-Value="myTime" Format="@("hh\\:mm\\:ss")"></SfTimePicker> 
 
@code { 
    TimeSpan myTime = new TimeSpan(12, 59, 59); 
} 


Please get back us if you need further assistance. 

Regards, 
Ponmani M 


Loader.
Up arrow icon