MudNumericField: Ignore default UI Culture#10734
Conversation
...r.UnitTests.Viewer/TestComponents/DatePicker/DateRangePickerPresetWithoutTimestampTest.razor
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #10734 +/- ##
==========================================
- Coverage 91.84% 91.83% -0.01%
==========================================
Files 427 427
Lines 13428 13430 +2
Branches 2591 2592 +1
==========================================
+ Hits 12333 12334 +1
Misses 523 523
- Partials 572 573 +1 ☔ View full report in Codecov by Sentry. |
|
I agree. Should we put an alert on the docs that numeric field does not automatically adjust to the UICulture due to technical limitations and that the user should make sure to set Culture accordingly? |
Yeah I could do that |
|
@henon see added doc alert |
|
|
The alert in the docs is very good. Thanks a lot @Anu6is |



Description
The base
MudNumericFieldrenders a simple<input type="number" ...>element as of #10192. The goal of<input type="number">is to provide a predictable, universal format for numerical data input. As such, it behaves in the following mannerIf a user wants anything more advanced, they would define for themselves the
Culture,PatternorFormatto be used. When any of these are defined, theMudNumericFieldwill instead render an<input type="text" ...>element. Currently, whenCultureisn't defined, it defaults to the UI Culture. When the DefaultConverter attempts to convert the user input, it uses the UI Culture for the conversion. As culture is not supported by<input type="number" ...>it should be ignored during conversion.Resolves #10730
How Has This Been Tested?
Visually and unit tests
Type of Changes
Checklist
dev).