How to change the browsers locale? #53619
-
I have been reading the page about Blazor Globalization, and specifically this part And for some reason, I don't get it to work. The input on the English browser accepts a On the Dutch browser, the input accepts a What I am looking for is a way to have both browsers use the same formatting (So basically I want to set the locale) I tried adding builder.Services.AddLocalization();
app.UseRequestLocalization("nl-NL"); To force both browsers to have the Input accept the DateTime in the format (My ultimate goal is that users can select the locale they want, but for now I am content with statically setting the locale to the one I want) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hmm reading up on it some more, it isn't possible to change the browser's locale programmatically at all. So this issue has nothing to do with Blazor. |
Beta Was this translation helpful? Give feedback.
Hmm reading up on it some more, it isn't possible to change the browser's locale programmatically at all. So this issue has nothing to do with Blazor.
My only option is to make a custom input component to do the datetime part. (and maybe also the number part for the comma/dot issue)