Click here to Skip to main content
13,097,884 members (57,046 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I recently posted a question about formatting date inputs for IOS 5 safari. It works out so long as the date input is formatted YYYY-MM-DD. So february 22 2012 needs to be 2012-02-22 to work on an ipad. I simply overrode the jquery datepicker function to detect if it was an ipad, transform the date from mm-dd-yyyy to the ipad format before creating a date element to replace the text input.

Now however, the customer has asked that I change the value rendered out to the client and displayed to all users to display the above example date as 22/feb/2012, and they would like it to work correctly for 10 or so languages including Chinese, and Russian.

I can work it out for the standard browsers of IE, FF, and Chrome thanks to the awesomeness of jquery and its date picker. I don't see a clean way in my safari specific js for transforming to the date node, to handle transforming 05/jan/2012, 05/ene/2012, etc all back to 2012-01-05.

I could conceivably hack something together, but I am curious if anyone has an elegant solution, or knows something more about how safari handles the date node that I don't.
Posted 12-Jan-12 8:01am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 12 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100