Here is my issue, I have a two selectors: one for month and one for year that use the values of two numeric (mmyy). So I have the javascript force a require on them, if none are selected. Now all I need to do is figure out how to make it they cannot select an expired date. like 0113 would return invalid, but 0313 would.
You should probably be doing this with PHP. If you must use javascript, use this: function isDateValid(year, month) { var current = new Date(), currentYear = current.getYear(); year += 2000; var compare = new Date(year, month, 1, 0, 0, 0, 0); return current.getTime()<compare.getTime(); } Code (markup): Again, please use PHP.