Why does Blazor version 7.1.0 not default to system culture to format DateTime and numbers?

1 Answer 63 Views
DatePicker Grid
Francis
Top achievements
Rank 1
Iron
Iron
Iron
Francis asked on 17 Dec 2024, 09:15 PM

Out of the box, after updating today to 7.1.0, converted the Weather page from table to TelerikGrid component and the date was being displayed with coma as separator. My html tag's lang was set to en-US, and the SatelliteResourceLanguage property was set to en-US, my OS's regional setting is US and yet the display was European culture.


            var cult = CultureInfo.GetCultureInfo( "en-US" );
            CultureInfo.DefaultThreadCurrentCulture = cult;
            CultureInfo.DefaultThreadCurrentUICulture = cult;

Adding the above code, resolved the issue. But my expectation is to default to the system's culture even when the application is supporting globalization/localization.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 20 Dec 2024, 08:36 AM

Hello Francis,

I confirm that our components apply numeric and date formats, depending on the current app culture. In this case, I would double-check the app and OS configuration. Also review Home.razor in the attached app, which compares the app culture formats with the Telerik component formats.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DatePicker Grid
Asked by
Francis
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Dimo
Telerik team
Share this question
or