Package Exports
- vue-masked-input
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-masked-input) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Vue Masked Input
Dead simple masked input component for Vue.js 2.X. Based on inputmask-core.
Live Demo
Install
npm
npm install vue-masked-input --save
Usage
Use it with v-model
just like a native html input with the mask
attribute:
<masked-input v-model="date" mask="11/11/1111" placeholder="dd/mm/yyyy" />
The following format characters define editable parts of the mask (see inputmask-core):
1
- numbera
- letterA
- letter, forced to upper case when entered*
- alphanumeric#
- alphanumeric, forced to upper case when entered
If you need to include one of these characters as a static part of the mask, you can escape them with a preceding backslash:
<masked-input v-model="phone" mask="+\\1 (111) 111-1111" placeholder="Phone number" type="tel" />
Known issues/TODO
- Copy/cut/paste in FF
- Copy/cut/paste in mobile Chrome
- Cyrillic chars are not supported