logo

Response

« Return to the main article

You are viewing this page out of context. To see it in the context it is intended please click here.

About This Page

Reply posted by Simon P on Thu 8 Aug 2002 in response to Form Validator R2.0

Date Validation?

Firstly, this thing is a life saver.


I do have a question about it however.


Can I use it to validate 2 date fields with each other? I need to check to
make sure Date B is greater than Date A.


I wrote some script like this:


if ((f.DateA.value) > (f.DateB.value)) {
alert("The Date B can't be before Date A");
f.DateB.focus();
return false
}


But I can't work out where it should fit without it causing me errors.


Any help would be appreciated.


Cheers
Simon