background preloader

Forms

Facebook Twitter

FullCalendar. Pickadate.js. Masked Input Plugin. First, include the jQuery and masked input javascript files. Next, call the mask function for those items you wish to have masked. Optionally, if you are not satisfied with the underscore ('_') character as a placeholder, you may pass an optional argument to the maskedinput method.

Optionally, if you would like to execute a function once the mask has been completed, you can specify that function as an optional argument to the maskedinput method. You can now supply your own mask definitions. jQuery(function($){ $.mask.definitions['~']='[+-]'; $("#eyescript").mask("~9.99 ~9.99 999");}); You can have part of your mask be optional.

jQuery(function($){ $("#phone").mask("(999) 999-9999? If your requirements aren't met by the predefined placeholders, you can always add your own. jQuery(function($){ $("#phone").mask("#hhhhhh");}); By design, this plugin will reject input which doesn't complete the mask.