trimble-oss / modus-web-components

This library provides Modus components as web components - reusable, encapsulated UI elements that are framework agnostic (can be implemented in any site).
https://modus-web-components.trimble.com/
MIT License
34 stars 71 forks source link

Localization for Numbers #2280

Closed enowak1031 closed 2 weeks ago

enowak1031 commented 6 months ago
  1. Numerical inputs add a selectable pattern in a global context with option for "." and ","
    allow depending on localisation: 123456789,12345 allow depending on localisation: 123456789.12345
  2. Include option of spaces as a divider. This way users are not confused by multiple "." or "," ( e.g. 123.456.789,12 or 123,456,789.12) allow depending on localisation: 123 456 789,12345 allow depending on localisation: 123 456 789.12345
  3. Add the ability to limit the number of characters before and after a "." or ",". This would ensure that people only enter valid numbers, and would reduce errors. e.g. 9 characters before and 2 after "." or "," allow depending on localisation: 123456789,12 allow depending on localisation: 123456789.12
austinoneil commented 6 months ago

I think this can be achieved using autoNumeric.

enowak1031 commented 4 months ago

@cjwinsor I'm going to move this one to Refinement, so we can assess.

ElishaSamPeterPrabhu commented 3 months ago

@enowak1031 @coliff Some pattern to be followed for the currency part ?(Initial Release)