Browse Source

fixed - bug Calendar popup does not work issue #5359

John Hinojosa 15 years ago
parent
commit
6ca6786671
1 changed files with 4 additions and 4 deletions
  1. 4 4
      main/inc/lib/formvalidator/Element/tbl_change.js.php

+ 4 - 4
main/inc/lib/formvalidator/Element/tbl_change.js.php

@@ -174,12 +174,12 @@ function returnDate(d,m,y) {
 			window.close();
 		}
 	}
-	datevalues[0].selectedIndex = (d-1) ;
+	datevalues[0].selectedIndex = (d-1);
 	datevalues[1].selectedIndex = m;
 	date = new Date();
-	year = 1900;
-	datevalues[2].selectedIndex = (y-year);
-
+	year = date.getFullYear();
+	year = (year-7);
+	datevalues[2].selectedIndex = (y-year); 
 	for(i = 0; i<= 3; i++)
 	{
 		attributes = datevalues[i].attributes;