Good day. I am having trouble with:
if(document.assessAdmin.warningDate.value > periodFinishDate)
{
alert("Your 'Warning Date' value(" + document.assessAdmin.warningDate.value +") must be less than the end date of the current period(" + periodFinishDate + ") ");
document.assessAdmin.warningDate.focus();
document.assessAdmin.warningDate.select();
return(false);
}
The condition does not get entered in to. I have been looking at it for far to long. It does not error. I placed the alert outside the condition to see the values, they are:
document.assessAdmin.warningDate.value = 27/10/2006
periodFinishDate = 30/9/2006
FYI: the periodFinishDate value gets passed during form validation inside an event in an image tag. When I view the page source the function shows the following values (they are the start and the end dates of the current FY quarter):
onClick="return val('1/7/2006','30/9/2006');"
My objective is to not allow the form to submit if the user defined warning date is > than the last day of the current FY quarter.
TYIA
if(document.assessAdmin.warningDate.value > periodFinishDate)
{
alert("Your 'Warning Date' value(" + document.assessAdmin.warningDate.value +") must be less than the end date of the current period(" + periodFinishDate + ") ");
document.assessAdmin.warningDate.focus();
document.assessAdmin.warningDate.select();
return(false);
}
The condition does not get entered in to. I have been looking at it for far to long. It does not error. I placed the alert outside the condition to see the values, they are:
document.assessAdmin.warningDate.value = 27/10/2006
periodFinishDate = 30/9/2006
FYI: the periodFinishDate value gets passed during form validation inside an event in an image tag. When I view the page source the function shows the following values (they are the start and the end dates of the current FY quarter):
onClick="return val('1/7/2006','30/9/2006');"
My objective is to not allow the form to submit if the user defined warning date is > than the last day of the current FY quarter.
TYIA