Click here to Skip to main content
15,896,527 members
Articles / Programming Languages / Javascript

JavaScript Date Validation

10 Jan 2011CPOL 2.6K   2
How about this? Just split it and send to this function:function isValidDate(day,month,year){var dt;dt=new Date(year,month-1,day); // as months are 0-11return ((day==dt.getDate()) && (month==dt.getMonth()) && (year==dt.getFullYear()));}I used it from somewhere.
Only logged in members can view this content

Please go to the Javascript Table of Contents to view the list of available articles in this section.
Closed because this item's quality is too poor to be published. Reported by Sean Ewington, Prosan on Wednesday, June 20, 2012 1:19pm