Input Mask Plugin With JavaScript/jQuery – inputmask

Form
Demo    Download
Easy JavaScript-jQuery Input Mask Plugin - inputmask
File Size: 11.79 KB
Views Total: 436 views
Last Update:September 16, 2021
Publish Date: September 20, 2010
Official Website: Go to website
License: MIT
Plugin Author: RobinHerbots

A Free jQuery plugin with Input Mask plugin is a lightweight and easy to use with JavaScript/jQuery plugin. It makes it easier to use and create an input mask. An input mask helps the user side with the input by predefined format. This can be useful for dates, numeric, phone numbers, email-address etc.

How To Use:

Add jQuery after add Input Mask plugin.

<!-- As A Vanilla JS Plugin -->
<script src="/path/to/dist/inputmask.min.js"></script>
<!-- As A jQuery Plugin -->
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/dist/jquery.inputmask.min.js"></script>
<!-- Allows data-input attribute -->
<script src="/path/to/dist/bindings/inputmask.binding.js"></script>

Use data-inputmask-<the name of the option>=”value”

<input data-inputmask="'alias': 'date'" />
<div contenteditable="true" data-inputmask="'mask': '9', 'repeat': 10, 'greedy' : false"></div>
<textarea data-inputmask="'mask': '99-9999999'" /></textarea>

Add Script plugin on the target element.

$("Selector").inputmask();
$("Selector").inputmask("99-9999999");

Default masking definitions.

  • 9: numeric
  • a: alphabetical
  • *: alphanumeric

Predefined mask alias.

  • datetime
  • numeric
  • cssunit
  • url
  • IP
  • email
  • mac
  • vin

Done

List Of Version :
  • 5.0.6
  • 5.0.6-beta.57
  • 5.0.6-beta.43
  • 5.0.6-beta.42
  • 5.0.6-beta.40
  • 5.0.6-beta.37
  • 5.0.6-beta.32
  • 5.0.6-beta.31
  • 5.0.6-beta.29
  • 5.0.6-beta.25
  • 5.0.6-beta.24
  • 5.0.6-beta.23
  • 5.0.6-beta.22
  • 5.0.6-beta.21
  • 5.0.6-beta.20
  • 5.0.6-beta.19
  • 5.0.6-beta.18
  • 5.0.6-beta.15
  • 5.0.6-beta.14
  • 5.0.6-beta.12
  • 5.0.6-beta.11
  • 5.0.6-beta.9
  • 5.0.6-beta.8
  • 5.0.6-beta.6
  • 5.0.6-beta.5
  • 5.0.6-beta.3
  • 5.0.5
  • 5.0.4
  • 5.0.4-beta.33
  • 5.0.4-beta.26

Mady

Mady Schaferhoff is an expert jQuery script at jQuerypost. He offers web development services to clients globally. He also loves sharing Html,CSS, jQuery knowledge through blog posts like this one.