New issue
Advanced search Search tips

Issue 682440 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 521871
Owner: ----
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

<input type="datetime-local"> does not allow space instead of "T" in value strings

Project Member Reported by cvrebert@google.com, Jan 18 2017

Issue description

Chrome Version: 55.0.2883.95
OS: macOS Sierra 10.12.2

What steps will reproduce the problem?
(1) Open http://w3c-test.org/html/semantics/forms/constraints/form-validation-validity-valueMissing.html in Chrome.
(2) Observe the test results.

What is the expected result?
All the tests should pass.

What happens instead?
2 tests fail:
Fail	[INPUT in DATETIME-LOCAL status] Valid local date and time string(2000-12-10 12:00)
Fail	[INPUT in DATETIME-LOCAL status] Valid local date and time string(1979-10-14 12:00:00)


Further details:
Per
https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local):value-sanitization-algorithm
<input type="datetime-local">'s value is parsed as a "valid local date and time string",
which is defined by
https://html.spec.whatwg.org/multipage/infrastructure.html#valid-local-date-and-time-string
as:
a "valid date string", followed by
a U+0054 LATIN CAPITAL LETTER T character (T) **or** a U+0020 SPACE character
followed finally by a "valid time string".

However, Chrome seems to treat local-date-and-time-strings which use a space instead of a "T" as invalid,
and thus does not update the <input>'s value when the testcase tries to set the `value` IDL property to the values in question.

In fact, when I try to set such values manually via the JS console, it yields warnings like:
> The specified value "2000-12-10 12:00" does not conform to the required format.  The format is "yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS".
 

Comment 1 by tkent@chromium.org, Jan 18 2017

Mergedinto: 521871
Status: Duplicate (was: Untriaged)

Sign in to add a comment