WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
133731
Forced date format for input of type=date
https://bugs.webkit.org/show_bug.cgi?id=133731
Summary
Forced date format for input of type=date
dtrunk90
Reported
2014-06-11 02:37:54 PDT
The date value interpreted from input[type=date] in the HTTP Request such as GET / POST will be formatted as yyyy-mm-dd. Why? It's a task of the server-side how a textfield should be interpreted. No other browser manipulates any input data before sending to the server. Example: Germany - Common date format is dd.mm.yyyy When setting up a hibernate validator model (Java) which represents the form and adding @DateTimeFormat(pattern="dd.MM.yyyy") to the field I'm facing an error as Chrome manipulates the value. So I have the choice now: Manipulate the value on all other browsers as well and set the pattern to yyyy-MM-dd or make a workaround for Chrome to stop manipulating that value. As the value shouldn't be manipulated I'd prefer the second one. What's the idea behind that manipulation?
Attachments
Add attachment
proposed patch, testcase, etc.
Jayden Seric
Comment 1
2018-12-11 17:22:00 PST
This is not a bug, by spec the value for input[type='date'] must conform to the ISO 8601 standard for computer-readable date and time formats, see
https://html.spec.whatwg.org/multipage/forms.html#input-author-notes
. The standard format allows things such as the min and max attributes and autocompletion to work. If you want to submit arbitrary text you should use input[type='text']. This issue can be closed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug