2 ms·
Another problem with `type="number"`, that this blog post does not mention - although for good reason (it's British) - is that different versions of Android wil
by Svip 5y ago
Another problem with `type="number"`, that this blog post does not mention - although for good reason (it's British) - is that different versions of Android will provide either "." or "," decimal pointer, depending on locale or not at all. Some phones - regardless of how much you insist on a comma-locale - would still provide "." as the only option. Eventually, we had to switch to `type="text" inputmode="numeric"` and interpret both "." and "," as a decimal separator. Most people won't bother to enter thousand separators anyway.
These numbers were amounts, i.e. actual numbers, and not text fields with only digits, so `type="number"` doesn't even work for actual numbers, as soon as you move beyond English.
- ht85 5y agoIf you handle the data programatically parseFloat will always work as expected. No good solution for native submit though :/