ionic-input-mask
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

ionic-input-mask

Input mask for Ionic2 and upper versions.

Getting Started

Installing

npm install ionic-input-mask --save

Using

 
app.module.ts
import { InputMaskModule } from 'ionic-input-mask';
imports[
    InputMaskModule,
]
# *.html
<input-mask mask="+32 (0) 4__/__.__.__" allowedChars="0-9" type="tel" maskCharacter="_" tabindex="100"></input-mask>

mask

Mandatory
Definition of the mask. maskCharacter (default = '_') will define the maximum length of the field and which characters will be replaced in the mask. Mask is not included in the return value, only input typed by the user.

maskCharacter

Optional
Define which character in the mask should be replaced.
Default value is '_'.

allowedChars

Optional
Define which characters are allowed in the field. Must be character range like in regular expression.
Ex:

  • 0-9 -> Numbers only
  • A-Z -> Letters only, in uppercase

If not defined, all characters are allowed.

tabindex

Optional
Directly linked to ion-input field tabindex.

type

Optional
Directly linked to ion-input field type.

Readme

Keywords

Package Sidebar

Install

npm i ionic-input-mask

Weekly Downloads

22

Version

1.0.1

License

MIT

Last publish

Collaborators

  • edumdum