(this only works in Chrome at the moment as most browsers don\'t yet implement date picker for input type=\"date\")
In the following example MyDate starts o
From HTML 5 - Input type date formatting on iOS
There are two formats at play:
- displayed format
- internal format exposed to JavaScript and sent to the server
You cannot change the display format. It's up to the browser to decide how the date is presented to the user (in practice it's determined by system's locale).
You cannot change the internal format either. It's always ISO8601, regardless of browser/locale.
You'll have to pre-populate it with that specific format, and you can add a computed observable to parse it into a Date object, so you can read it at other places in your application.
If you also want to write to it from JS, you could set up a writeable computed observable and parse the input to see if it's a string from the input field, or a Date object from your JS.