Skip to content

Instantly share code, notes, and snippets.

@maxdenaro
Created August 4, 2019 16:15
Show Gist options
  • Select an option

  • Save maxdenaro/a096cec79b9bf48563a1939d5d8ce7e6 to your computer and use it in GitHub Desktop.

Select an option

Save maxdenaro/a096cec79b9bf48563a1939d5d8ce7e6 to your computer and use it in GitHub Desktop.
Inputmask
<input type="tel" name="tel" placeholder="phone">
// !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