Hi all,
i need problem with validating date
here is the function i used for date validation.
//
function isDateValid(title,start) {
if(start.value.length < 10) {
alert('The '+title+' Start Date is too short.');
start.focus();
return false;
}
if(!dateFormatValidation(start,false,title+' Start Date')) {
start.focus();
return false;
}
return true;
}
function validateEffectiveDates() {
var title = 'Effective';
var start = document.myform.effectiveStartDate;
return isDateValid(title,start);
}
//
but now the problem is if the enter the date 7/06/2005 or 05/2/1970, it says the the date is too short.
how can i achieve validation for these with the same caode instead of entering 07/06/2005 and 05/02/1970?
regards and thanks in advance
i need problem with validating date
here is the function i used for date validation.
//
function isDateValid(title,start) {
if(start.value.length < 10) {
alert('The '+title+' Start Date is too short.');
start.focus();
return false;
}
if(!dateFormatValidation(start,false,title+' Start Date')) {
start.focus();
return false;
}
return true;
}
function validateEffectiveDates() {
var title = 'Effective';
var start = document.myform.effectiveStartDate;
return isDateValid(title,start);
}
//
but now the problem is if the enter the date 7/06/2005 or 05/2/1970, it says the the date is too short.
how can i achieve validation for these with the same caode instead of entering 07/06/2005 and 05/02/1970?
regards and thanks in advance