jquery.inputmask is a jquery plugin which create an input mask ;-)
The plugin is based on the maskedinput plugin of Josh Bush (http://digitalbush.com/projects/masked-input-plugin), but has finer control over the 'mask-definitions' and is fully compatible with the ui-datepicker
A definition can have a cardinality and have multiple prevalidators.
These allow for a finer date validation then 99/99/9999 which also allows 33/33/3333 for example. In the jquery.inputmask.extentions.js you find a full date input validation which takes days, months & leap years into account.
Also extra features like mask-repetitions (greedy and non-gready) and many other additions are included. In the examples you will find more about them.
## Optional Masks When `clearIncomplete: true` is set in the options, the mask will treat masks marked option as separate from those that are not optional.
For example, given: ```javascript $('#test').inputmask('999[-AAA]',{ clearIncomplete: true }); ``` While the field has focus and is blank, users will see the full mask `___-___`. When the required part of the mask is filled and the field loses focus, the user will see `123`. When both the required and optional parts of the mask are filled out and the field loses focus, the user will see `123-abc`.
use; $(document).ready(function(){ $("#date").inputmask("date"); => equals to $("#date").inputmask("d/m/y"); });
or use the dd/mm/yyyy alias of the date alias: $(document).ready(function(){ $("#date").inputmask("dd/mm/yyyy"); => equals to $("#date").inputmask("d/m/y"); });
auto upper/lower- casing inputmask
see jquery.inputmask.extentions.js for an example how to define "auto"-casing in a definition (definition A) casing can be null, "upper" or "lower"