igorescobar / jQuery-Mask-Plugin

A jQuery Plugin to make masks on form fields and HTML elements.
http://igorescobar.github.io/jQuery-Mask-Plugin/
Other
4.77k stars 1.42k forks source link

.mask() method doesn't work on inputs with type "number" #765

Open mohammadhossein1976 opened 3 years ago

mohammadhossein1976 commented 3 years ago

Describe de problem depth:

hi, i use your mask plugin for all of the website's inputs. One problem it has is that the .mask() method only effects the input when the input's type is 'text', and it won't work when the type is 'number'. The reason our team insists on using 'number' type is because in mobile devices only numbers will be shown on the keypad, so it will have better UI/UX.

It would be a very great help if you could fix this issue. Thank you.

luis-fss commented 3 years ago

Please read: https://github.com/igorescobar/jQuery-Mask-Plugin/issues/450#issuecomment-253225719

luis-fss commented 3 years ago

And just below that comment is a possible solution to your problem.