logo
Input Mask

A plugin to make masks on form fields. Demo page.

Usage

To use the plugin, you need to add the following files.

<script src="libs/input-mask/jquery.mask.js"></script>

Phone

<input type="text" data-input-mask="phone" class="form-control" placeholder="(555) 555-5555">
$('[data-input-mask="phone"]').mask('(000) 000-0000');

Date

<input type="text" data-input-mask="date" class="form-control" placeholder="2019/12/05">
$('[data-input-mask="date"]').mask('0000/00/00/');

Time

<input type="text" data-input-mask="time" class="form-control" placeholder="12:25:45">
$('[data-input-mask="time"]').mask('00:00:00');

Money

<input type="text" data-input-mask="money" class="form-control" placeholder="54,28">
$('[data-input-mask="money"]').mask('#.##0,00', {reverse: true});

Ip Address

<input type="text" data-input-mask="ip_address" class="form-control" placeholder="192.168.544.444">
$('[data-input-mask="ip_address"]').mask('099.099.099.099');
On this page