Validating dates in format dd MMM yyyy
Posted on 2004-10-04
I am writing an app that will be accessed by UK and US users, so date input is tricky. I decided to enforce date input in the format dd MMM yyyy (eg 05 Oct 2004) as it is unambiguous. I used a regular expression validator to check for 2 digits, a space, 3 alpha, a space, 4 digits. That bit works. But when I use a RangeValidator to check it is a valid date, so that people don't input 99 XYZ 1234, it fails even on 'valid' dates.
Any suggestions how I can handle UK and US date input?