I am using an HTML 5 form on an iPhone. This form has an input element like the following:
<input id="birthdate" type="date" />
When a user clicks this field, the iOS date picker appears. After a user selects a date, it puts the date in the field displayed as something like: Apr 14, 2012.
My question is, is there a way to format this date so that it looks like 04-14-2012 in the text box? Or, preferably, is there an straight forward approach to converting the iOS date format to a JavaScript Date object?