Minimal Date Input Mask Plugin With jQuery - datable.js

Minimal Date Input Mask Plugin With jQuery - datable.js
File Size: 26.3 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

datable.js is a jQuery date input mask plugin that automatically formats and validates dates as you type on form inputs. Compatible with Twitter's Bootstrap 3 framework.

How to use it:

1. Download and include the datable.js script after you have jQuery JavaScript library loaded.

<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="datable.js"></script>

2. Create a normal text field for the date input. You can specify the date format using data-datable attribute like this:

<input id="input1" type="text" data-datable="mmyyyy">

3. Active the plugin on the text field and done.

$('input[data-datable]').datable();

4. You can also change the default divider using data-datable attribute:

<input id="input" type="text" 
       data-datable="mmddyyyy"  
       data-datable-divider=" - "
>

Change logs:

2018-01-26

  • v0.5.0

2016-07-19

  • era validation bugfix

2016-07-09

  • new version - reworked validation

2016-05-25


This awesome jQuery plugin is developed by invot. For more Advanced Usages, please check the demo page or visit the official website.