New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 625316 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

valueAsDate returns Null on datetime-local input fields

Reported by yammesi...@gmail.com, Jul 1 2016

Issue description

Chrome Version       : 53.0.2777.0 (Official Build) canary (64-bit)
URLs (if applicable) :

What steps will reproduce the problem?
(1) Create a datetime-local input element using this line: <input class="form-control" name="event-start-time" id="event-start-time" type="datetime-local" required>
(2) Fill in your birthday date (yay).
(3) Run document.getElementById("event-start-time").valueAsDate

What is the expected result?
Date object with the value of your birthday.

What happens instead?
null

Please provide any additional information below. Attach a screenshot if
possible.
Should return Date object according to W3C: https://www.w3.org/TR/html-markup/input.datetime-local.html
document.getElementById("event-start-time").valueAsNumber works as expected.
Works on <input type="date"> object as expected.
 
Cc: kavvaru@chromium.org
Labels: Needs-Feedback
yammesicka@ Thanks for the issue.

Could you please provide us any sample test file or URL to triage the issue from test team end.

Thanks,
Sure. Here you go.

buya.html
1.8 KB View Download
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 7 2016

Labels: -Needs-Feedback Needs-Review
Owner: kavvaru@chromium.org
Thank you for providing more feedback. Adding requester "kavvaru@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: Blink
Labels: -Needs-Review M-54 OS-Linux OS-Mac OS-Windows
Owner: ----
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on windows 7,Linux Ubuntu 14.04 and Mac 10.11.6 using chrome version 52.0.2743.82 and canary 54.0.2815.0.Observed the date object is null.Please find the attached screen shot for the same.

Considering this as non regression issue as this is seen from M49 builds.M48 and prior builds are not displaying any results for this issue.
Marking it as Untriaged to get more inputs from dev team.

Thanks,

Comment 5 by kochi@chromium.org, Aug 2 2016

Components: -Blink Blink>Forms>Datetimelocal
Owner: tkent@chromium.org
Status: Assigned (was: Untriaged)
Assigning tkent@-san.

Comment 6 by tkent@chromium.org, Aug 2 2016

Labels: -M-54 Needs-Feedback
Status: Unconfirmed (was: Assigned)
> (2) Fill in your birthday date (yay).

Do you mean you fill only year, month, and day, and no time?

Comment 7 by tkent@chromium.org, Aug 2 2016

Summary: valueAsDate returns Null on datetime-local input fields (was: viewAsDate returns Null on datetime-local input fields)
attaching the screen shot for more clarification.
Filled all the details year, month, day and time clicked on submit button.Observed the date object is null in devtools console.

Thanks,
625316.png
101 KB View Download

Comment 9 by tkent@chromium.org, Aug 2 2016

Labels: -Needs-Feedback
Status: WontFix (was: Unconfirmed)
Ah, I see.  I remembered this behavior was defined by the standard.

https://html.spec.whatwg.org/multipage/forms.html#input-type-attr-summary

type=datetime-local should not support valueAsDate as the table shows.

Sign in to add a comment