Created
August 4, 2019 16:15
-
-
Save maxdenaro/a096cec79b9bf48563a1939d5d8ce7e6 to your computer and use it in GitHub Desktop.
Inputmask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input type="tel" name="tel" placeholder="phone"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // !IMPORTANT: required inputmask.js | |
| // npm i inputmask | |
| import Inputmask from 'inputmask'; | |
| let selector = document.querySelectorAll('input[type=tel]'); | |
| let im = new Inputmask('+375 (99) 999-99-99'); | |
| im.mask(selector); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment