Function isdate (CheckText) {var datetime; var year, month, day; var gone, gtwo; if (Trim (checktext.value)! = "") {datetime = trim (checktext.value); if (DateTime.length = = 10) {year = datetime.substring (0,4); if (isnan == true) {alert ("Please enter the date! Format is (YYYY-MM-DD) / N example (2001-01- 01)! "); CheckText.focus (); return false;} gone = datetime.substring (4, 5); Month = DateTime.Substring (5,7); if (isnan == true) {Alert ("Please enter the date! YYYY-MM-DD) / N example (2001-01-01)!"); Checktext.focus (); return false;} gtwo = datetime.substring (7,8); Day = datetime.substring (8, 10); if (isnan (day) == true) {alert ("Please enter the date! Format is (YYYY-MM-DD) / N example (2001-01-01)!" CheckText.focus (); return false;} IF ((gtwo == "-") && (gtwo == ")) {if (Month <1 || Month> 12) {Alert (" Month must Between 01 and 12! "); Checktext.focus (); return false;} if (DAY <1 || day> 31) {alert (" Date must be between 01 and 31! "); CheckText.foCus ();} Else {if (Month == 2) {if (isleapyear && day> 29) {Alert ("February Date must be between 01 to 29!"); CheckText.foC US (); return false;} if (! isleapyear (year) && day> 28) {Alert ("February Date must be between 01 to 28!"); checktext.focus (); return false;}}} (MONTH == 4 || Month == 6 || Month == 9 || Month == 11) && (Day> 30)) {Alert ("in four, six, nine, Nirtiend / N" must 01 to 30 Between ""); checktext.focus (); return false;}} else}}} else {Alert ("Please enter the date! YYYY-MM-DD) / N (2001-01-01)" CheckText.focus (); return false;}} else {alert ("
Please enter the date! Format is (YYYY-MM-DD) / N (2001-01-01) "); checktext.focus (); return false;}} else {return true;} Return true;} script >