Globalization in Blazor TimePicker

27 Aug 20261 minute to read

Localization

The Blazor TimePicker component can be localized by providing the appropriate locale data and culture. Refer to the Blazor Localization topic to learn how to localize Blazor components.

Right-To-Left

The Blazor TimePicker supports right-to-left (RTL) functionality for languages such as Arabic and Hebrew. Use the EnableRtl property to enable RTL direction.

The following code example initializes the Blazor TimePicker component in the Arabic culture.

@using Syncfusion.Blazor.Calendars
@inject HttpClient Http;

<SfTimePicker TValue="DateTime?" Locale="ar" EnableRtl="true"></SfTimePicker>

@code {
    [Inject]
    protected IJSRuntime JsRuntime { get; set; }
    protected override async Task OnInitializedAsync()
    {
        this.JsRuntime.Sf().LoadLocaleData(await Http.GetJsonAsync<object>("blazor-locale/src/ar.json")).SetCulture("ar");
    }
}

Right to Left in Blazor TimePicker

See also