Wednesday, June 5, 2024
 Popular · Latest · Hot · Upcoming
14
rated 0 times [  18] [ 4]  / answers: 1 / hits: 36879  / 14 Years ago, mon, august 16, 2010, 12:00:00

I'd like to add native date pickers to my application, which currently uses a legacy, home-rolled system. Date input support isn't widespread, yet, but if I could present both implementations based on compatibility, that would be ideal.



Is there any way to specify the output of the value given by an HTML datepicker? The default for opera is yyyy-mm-dd, and I very explicitly need dd-MMM-yyyy.



Is there any way to control this output, currently?


More From » jquery

 Answers
23

The HTML5 date input field is specific about the format it uses:
RFC 3339 full-date


Is it possible to change the legacy date picker to use yyyy-mm-dd format (and update the server side that reads that)?


I assume not, so then you can add some Javascript glue code that listens for a change event on the HTML5 input and updates a hidden date value field to match the format of the legacy date picker (converts yyyy-mm-dd to dd-MMM-yyyy).


[#95897] Friday, August 13, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
citlalia

Total Points: 138
Total Questions: 104
Total Answers: 87

Location: Iceland
Member since Sat, Sep 17, 2022
2 Years ago
;