fixed an issue which was causing the project management system to not recognize December as a valid month

This commit is contained in:
Frank Dillon 2008-11-24 16:16:59 +00:00
parent ac0032fedf
commit 2449c18d63

View file

@ -399,12 +399,12 @@ function isValidDate(dt) {
var dd = split[2];
// if month out of range
if ( mm < 0 || mm > 11 ) {
if ( mm < 1 || mm > 12 ) {
return false;
}
// get last day in month
var d = (11 == mm) ? new Date(yyyy + 1, 0, 0) : new Date(yyyy, mm + 1, 0);
var d = (12 == mm) ? new Date(yyyy + 1, 0, 0) : new Date(yyyy, mm + 1, 0);
// if date out of range
if ( dd < 1 || dd > d.getDate() ) {