Click to See Complete Forum and Search --> : Date input text box validation


hexchad
06-22-2009, 05:57 AM
Hi guys,

Pls help. i need to validate my input text box that the user should type the correct format of the date in the input textfield box to "mm-dd-yyyy". onkeychange, if ever a wrong format is entered then it will prompt an "invalid date format" error message.

Thanks in advance,

Chad

cahva
06-22-2009, 09:48 AM
Google search with "javascript date validation" gives you many results (http://www.google.com/search?hl=en&hs=eDj&q=javascript+date+validation) to do what you want(specially the first one). Althought I wouldnt use onkeychange, onsubmit should be enough.

bradgrafelman
06-24-2009, 12:10 AM
Perhaps 'onblur' would be more suitable?