All I would like to do is write a simple validation routine to ensure
the date entered by the user is less then the current date.

Below is some puesdo code of what would be nice if it worked. But it
doesn't . . . .

 $.validator.addMethod("ValidDate", function(value, element) {
            var currentdate = new Date()
            var userdate    =  new Date(value)

            if (userdate.getTime() <= currentdate.getTime())
                return true;
            }
            return false;
        }, "Invalid Date.");

Any suggestions would be greatly appreciated!

Thanks in advance for the help.

Reply via email to