Limitations of TimeSpan DataType in Blazor TimePicker Component
7 Oct 20211 minute to read
Based on C# standard behavior, the custom TimeSpan format specifiers do not include placeholder separator symbols, such as the symbols that separate days from hours, hours from minutes, or seconds from fractional seconds. Instead, these symbols must be included in the custom format string as string literals. For example, “hh\:mm\:ss” defines a colon (:) as a separator between hours, minutes, and seconds.
@using Syncfusion.Blazor.Calendars
<SfTimePicker TValue="TimeSpan" @bind-Value="myTime" Format="@("hh\\:mm\\:ss")"></SfTimePicker>
@code {
TimeSpan myTime = new TimeSpan(12, 59, 59);
}