Description
This is a bit of a weird one, so apologies in advance.
In chapter E. Index:
Date state
Local Date and Time state
The display format for the date, and local date and time, input types is left to be implementation specific, meanwhile the value attribute is always normalised to dd-mm-yyyy
.
The lack of standardisation makes it difficult to set the value using the element-send-keys endpoint (https://www.w3.org/TR/webdriver/#dfn-element-send-keys) as the keys sent mimic the display format.
As an example, if I set the value of a date
element to 2012-12-25
I can do so successfully on Firefox, but Chrome uses a different date format of dd/mm/yyyy
for display. As a result my attempt to set the value leads to a garbage result of 1225-12-20
.
I feel that there should be some part of the spec which dictates that the accepted values must be normalised in some way.
In the current state it is not possible to write a cross-browser way of setting the date using the sendKeys endpoint.