2

I have an MVC 5 application that will be used world wide. A number of the pages in the app will require users to enter dates. I'll be using the jQuery datetimepicker plug-in to allow the user to select dates. Or they can enter them manually.

I'm curious what the best practice is for cultures where dates are entered in the dd/mm/yyyy format instead of mm/dd/yyyy? I could require all dates to be entered in mm/dd/yyyy format, which is the format my app is expecting, but I also don't want to cause too much angst with my users in other parts of the world.

5
  • just show the dd/MM/yyyy string as they are entering it, or use separate textboxes each with the proper label. either way this is a question for UX.SE Commented May 17, 2014 at 17:21
  • 2
    and I found the question related to that for you. Commented May 17, 2014 at 17:25
  • Very relevant: en.wikipedia.org/wiki/Date_format_by_country – so figure out the user's locale and switch to the appropriate format (with a clear visual indication of the format you're expecting). Or just follow the ISO 8601 standard – it's the international standard for good reasons. Or sidestep the issue via a graphical date picker that does not require textual input.
    – amon
    Commented May 17, 2014 at 18:51
  • 1
    @amon: don't go by country based on IP. When I am traveling my location will be different from my regional preferences. Commented May 18, 2014 at 10:06
  • @ratchetfreak: Good find. Randy: don't go coding supporting different regional formats yourself. It's a waste of time and you'll probably miss stuff. Can't recall the name right now, but there is a jQuery internationalization / validation library that will/should take care of this. Search for those terms and you will find it. Commented May 18, 2014 at 10:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.