GoncharukOrg / react-input

111 stars 9 forks source link

Сannot use type=number and InputNumberFormat together to mask a value #39

Closed Misterion96 closed 1 month ago

Misterion96 commented 1 month ago

I'm developing an app based on the “mobile first” principle

All my potential users will be entering a number and I would like them to be shown a keyboard for entering a number, not a phone number.

I understand this is such a limitation now to make it easier to work with strings, but are there any plans to add type="number" support for InputNumberFormat ?

This would greatly improve the UX of the user

GoncharukBro commented 1 month ago

The number type cannot store characters other than numbers, so it cannot be used in formatted input, but you can use the inputmode attribute with a value of numeric to display the desired keyboard.

Misterion96 commented 1 month ago

@GoncharukBro
It works just fine for my scenarios. Thank you