One problem that i have is with dates like "01/01/2000 14:45", but the hours
are optional. So, if i use a mask like "99/99/9999 99:99" then every time i
enter a date without hours i need to delete the end of the mask (i mean
"__:__"). It would be great if this plugin can handle that.

On 4/3/07, David Duymelinck <[EMAIL PROTECTED]> wrote:


It's a nice plugin and i'm going to use it but my only problem with it
is that you can't set the highest number for example i want to use it
to guided users to fill in a date so it would be great to be able to
use "31-12-9999" but that will be difficult because i saw it validates
each character seperate.

i changed it a bit

switch(mask.charAt(pos)){
               case '9':    return "[0-9]";
case'a':    return "[A-Za-z]";
               case '*':    return "[A-Za-z0-9]";
               default:    return null;
           }

to

switch(mask.charAt(pos)){
               case '1':    return "[0-1]";
               case '2':    return "[0-2]";
               case '3':    return "[0-3]";
               case '4':    return "[0-4]";
               case '5':    return "[0-5]";
               case '6':    return "[0-6]";
               case '7':    return "[0-7]";
               case '8':    return "[0-8]";
               case '9':    return "[0-9]";
case'a':    return "[A-Za-z]";
               case '*':    return "[A-Za-z0-9]";
               default:    return null;
           }

and

if(mask.charAt(i)!='9'  && mask.charAt(i)!='a' && mask.charAt(i)!='*')
{

to

if(mask.charAt(i)!='1' && mask.charAt(i)!='2' && mask.charAt(i)!='3'
&& mask.charAt(i)!='4' && mask.charAt(i)!='5' &&
                   mask.charAt(i)!='6' && mask.charAt(i)!='7' &&
mask.charAt(i)!='8' && mask.charAt(i)!='9'
                   && mask.charAt(i)!='a' && mask.charAt(i)!='*'){

It adds a lot of code but now i can use "39-19-9999". It's also not
really what i want but it does the job for now.


Reply via email to