Validate Future Date

Can someone point me in the direction of how to figure out how to validate a text input field with a date format (dd/mm/yyyy) and check that the date is greater than todays date.

I have already input the validation for the date format, only need to add in the check for future date, and return error message if its a future date.

Please help. Thank You.

this is my code

[code]

KONICA MINOLTA Singapore .padding2Copy { padding-left: 10px; }
<td>&nbsp;</td>
<td align="left">&nbsp;</td>
Global Singapore Business Products

  Business Products Meter Reading News Archive Careers Contact Us  
You are here: > Meter Reading
Meter Reading  
 
Home     Meter Reading   Contact
Meter Reading    
*Mandatory fields
Name *
Please fill in your name.
Email *
Please fill in your email.
Please fill in a valid email format.
Customer Code *
Please fill in customer code.
Company *
Please fill in company.
Country
Tel * Please fill in contact number
Model
Service Item Number *
Please fill in service item number.

Reading for the Month of * -- Select -- January February March April May June July August September October November December Please select a valid item.
Please select month.
Date of Reading * (dd/mm/yyyy)
Please fill in date of reading.

Please fill in a valid date format.
Meter Reading B/W *

Please fill in meter reading.Please enter a valid number.
Total (Only applicable for colour machine)

Please enter a valid number.

 
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
                                 
           
Back to top
Terms of Use | Sitemap     Global Site (Corporate Information | Social Responsibility)
©2011 Konica Minolta Business Solutions (S) Pte Ltd
[/code]

Hi,
you can try this function for future date validation

function checkdate() {
var date = document.getElementById(‘sprytextfield4’).value;//
var datearray = date.split("/");
var dat = new Date();
if(datearray[0] > dat.getDate()) {
return false;
} else {
return true;
}
}

Sponsor our Newsletter | Privacy Policy | Terms of Service