Jquery Masked Input Plugin Set Value Digits
$('.id').mask('999-99-9999-999-99'); I have the above mask input format i want to know if it is possible to have a predefined value for x number of characters like for example I w
Solution 1:
A workaround solution might be,
$.mask.definitions["9"] = null;
$.mask.definitions["^"] = "[0-9]";
$(".id").mask("639-27-^^^-^^^-^^");
- remove the definition for
9
- add a definition for numeric regex with a new key ex.
^
- use the new definition
hope this helps
Solution 2:
You can do it like this using the plugin: $(".id").mask("639-27-9999-999-99");
As they used 9 as their number definition, you can change it in their source code with any other character.
Post a Comment for "Jquery Masked Input Plugin Set Value Digits"