I am using a plugin that I found in http://www.mathachew.com/sandbox/jquery-autotab/
(please take a look at it to understand what I am talking about).
To change focus from an input after reaching the maxlength.. and also to validate the inputs
so I have this line here:
$("#day").autotab_filter({format:"custom", pattern:"0[1-9]|1[0-9]|2[0-1]|3[01]"});
$("#month").autotab_filter({format:"custom", pattern:"0[1-9]|1[012]"});
It seems that my regex patterns are wrong or something! I’ve tried every possible combination. Please help!
This is an example http://jsfiddle.net/DAsRR/
i’ve found the answer guys .. if any one needs it in the future:
i must specify the opposit of numbers between 01 and 31 because this is the pattern that will be removed, not to be kept !
so to specify all numbers except the range from 01 to 31 this is the correct pattern :
explaination:
[^0-9]will not except any character other than numbers ! from 0 to 900, is not a valid day number !
and
^[3][2-9]$is for all numbers that start with with 3 and end with numbers from 2 to 935, is not a valid day number though !!
and
^[4-9]is for numbers that start with 4 to 9 .any other question about that pluging i’d be glad to answer it