Can anyone give me a clue as to why this isn't working, I want to compare the date entered in my form to 1/4/06 I am using
onsubmit="return minus_Validator(this)" to call up the check
<SCRIPT LANGUAGE=JavaScript>
function minus_validator(theform)
{
var start_date =new Date("1/4/2006");
if (theform.datefrom.getTime() > start_date.getTime())
{
alert("Date is greater than 1st April 2006");
return (false);
}
return (true);
}
</script>
any help greatly appreciated
onsubmit="return minus_Validator(this)" to call up the check
<SCRIPT LANGUAGE=JavaScript>
function minus_validator(theform)
{
var start_date =new Date("1/4/2006");
if (theform.datefrom.getTime() > start_date.getTime())
{
alert("Date is greater than 1st April 2006");
return (false);
}
return (true);
}
</script>
any help greatly appreciated