input-mask-ios
input-mask-ios copied to clipboard
Number Formatting (Thousand Separator)
Prerequisites
- [X] Put an
X
between the brackets on this line if you have done all of the following:- read our Wiki;
- read the entire Known issues section;
- checked that my feature request isn't already filled;
- searched StackOverflow's
input-mask
tag for similar problems.
Summary
Hi! I stumbled upon this library in my journey to format numbers correctly for the user.
I want the user to enter a number, which will be formatted with decimal points and thousand separators:
Input | Output |
---|---|
1 | 1 |
12 | 12 |
123 | 123 |
1234 | 1,234 |
12345 | 12,345 |
123456 | 123,456 |
1234567 | 1,234,567 |
12345678 | 12,345,678 |
12345678.5 | 12,345,678.5 |
12345678.59 | 12,345,678.59 |
12345678.594 | 12,345,678.594 |
12345678.5948 | 12,345,678.5948 |
0.5 | 0.5 |
Motivation
Number Inputs (Currency, Crypto Amount)
Describe the solution you'd like
I'd like to have a mask that is able to format those numbers correctly.
Describe alternatives you've considered
I tried this: [099].[999].[999].[999].[999].[999],[999999999999]
Is this possible with this library? Any help appreciated!