vanilla javascript input mask
- get and set raw and unmasked values easily
- no external dependencies
- RegExp mask
- Function mask
- Number mask (integer and decimal)
- Date mask (various format support)
- Dynamic/on-the-fly mask
- Pattern mask
- show placeholder always and only when necessary
- unmasked value can contain fixed parts
- optional input parts (greedy)
- custom definitions
- reusable blocks
- Enum and Range masks
npm install imask
and import IMask from 'imask';
or use CDN:
<script src="https://unpkg.com/imask"></script>
npm run make
Supports all major browsers and IE11+ need to support older?