Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: safari iOS iPad
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 9:01am

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

  Print Answers RSS
0 OriginalGriff 195
1 Afzaal Ahmad Zeeshan 132
2 ProgramFOX 130
3 Maciej Los 115
4 Sergey Alexandrovich Kryukov 75
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,657
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 12 Jan 2012
Copyright © CodeProject, 1999-2014
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