Determine whether user is likely to be typing in dd/mm or mm/dd

52 views Asked by At

I have an input date field on a webpage which allows the users to type in a date in various common acceptable formats.

The user can however enter a date like 10/11/12. This could mean 10 November 2012 or 11 October 2012. Is there a way to determine which of thes etwo they are likely entering without prompting them each time depending on their locale etc. I looked at using javascript toLocaleDateString but the output formats vary greatly between different browsers.

Would there be another way to determine this information ? I would maybe need to determine if they are based in the US or not.

0

There are 0 answers