Hi,
I need some help with date calculations. I have a form with a date input box, the date is in for format dd/mm/yyyy the form calls a script before submiting it;
<form action="new2.asp" method="post" name="NewCall" onSubmit="return submitIt(this)">
The script looks a bit like;
<script language="JavaScript">
function submitIt(NewForm){
if (!(NewForm.NoCallBack.checked)){
if (NewForm.Date.value == ""
{
alert('You must enter a date')
return false
}
}
return true
}
I need this to also check if the date is in the past and for the life of me I can't figure it out. Does anyone have a solution.
Matt
I need some help with date calculations. I have a form with a date input box, the date is in for format dd/mm/yyyy the form calls a script before submiting it;
<form action="new2.asp" method="post" name="NewCall" onSubmit="return submitIt(this)">
The script looks a bit like;
<script language="JavaScript">
function submitIt(NewForm){
if (!(NewForm.NoCallBack.checked)){
if (NewForm.Date.value == ""
alert('You must enter a date')
return false
}
}
return true
}
I need this to also check if the date is in the past and for the life of me I can't figure it out. Does anyone have a solution.
Matt