How to localize Blazor DateRangePicker?

Answer:

We can localize Blazor DateRangePicker using below code snippet.

@using Syncfusion.Blazor.Calendars

<SfDateRangePicker>SfDateRangePicker>

@code {

[Inject]

protected IJSRuntime JsRuntime { get; set; }

protected override void OnAfterRender(bool firstRender)

{

this.JsRuntime.Sf().LoadLocaleData("wwwroot/ej2-locale/src/de.json").SetCulture("de").LoadCldrData(new string[] { "wwwroot/cldr-data/main/de/ca-gregorian.json", "wwwroot/cldr-data/main/de/timeZoneNames.json", "wwwroot/cldr-data/main/de/numbers.json" });

}

}


Find the sample for localize Blazor DateRangePicker from here.


Loader.
Up arrow icon