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

Issue 592924 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

HTML datepicker thinks date matching max is out-of-range

Reported by therealb...@gmail.com, Mar 8 2016

Issue description

Steps to reproduce the problem:
1. Try to load a date input where the max attribute and the value attribute are the same. e.g. <input type="date" value="2016-12-08" max="2016-12-08">.
2. The value will appear correct. However clicking the input brings up a window that will set the year to 0001 A.D. (because I guess the browser thinks "max" is exclusive, not inclusive?)
3. If I hit set, my date is suddenly 2000 years in the past. Not good!
4. Curiously, if I set the max to one day later (assuming the browser is treating it as exclusive), I'm allowed to select the new max date. Validation isn't upset, it doesn't seem -- only the datepicker.

What is the expected behavior?
The "max" attribute should be inclusive and setting the max and value attributes to be identical should not create problems. There is no issue on desktop.

What went wrong?
When 'max' and 'value' are the same for an <input type="date">, I get sent back to year 1.

Did this work before? N/A 

Chrome version: 48.0.2564.95  Channel: stable
OS Version: 6.0.0
Flash Version:
 
1466947_10208808525110864_2111992094_o.jpg
35.5 KB View Download
12822766_10208808525190866_2016993078_o.jpg
66.3 KB View Download
12842542_10208808525270868_1284628419_o.jpg
35.4 KB View Download
Cc: miguelg@chromium.org
Components: -UI UI>Input UI>Input>Text Blink>UI
Status: Available (was: Unconfirmed)

Comment 2 by tkent@chromium.org, Apr 11 2016

Components: -Blink>UI Blink
Remove unofficial Blink>UI.

Components: -Blink Blink>Forms>Date

Comment 4 by tkent@chromium.org, Apr 12 2016

Components: -UI>Input>Text -UI>Input
Labels: Needs-Feedback
yeah, max attribute should be inclusive.  What's your timezone setting of Android OS?

GMT-04:00 EDT

Comment 6 by tkent@chromium.org, Apr 13 2016

Labels: -Needs-Feedback
Thanks.

If it's helpful I can share the project where I'm experiencing this problem, and the source code. I don't think it's an issue with my source, but someone might discover otherwise.

Live site: https://benwiley4000.github.io/calorie_tracker_backbone/
Source repo: https://github.com/benwiley4000/calorie_tracker_backbone

How to experience the issue:
1. Search for a food (e.g. burger).
2. Click "+ Track this food" on one of the results.
3. A new option should appear for "+ New log entry." Click it.
4. Here's where you get the date picker. It should initialize to today, but click it and it will lose its place and revert to January, Year 1.

Note that it works fine outside of Android, as far as I know.

My Android version is 6.0. Not sure if that makes a difference.
P.S. I checked Firefox Mobile for good measure and I did not experience this issue, so it definitely seems to be Chrome specific even on mobile.

Comment 9 by tkent@chromium.org, Apr 13 2016

Labels: Hotlist-Interop
Project Member

Comment 10 by sheriffbot@chromium.org, Apr 13 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 11 by tkent@chromium.org, Apr 13 2017

Status: Available (was: Untriaged)
Project Member

Comment 12 by sheriffbot@chromium.org, Apr 16 2018

Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 13 by tkent@chromium.org, Apr 17 2018

Labels: -Hotlist-Recharge-Cold Needs-Feedback
Status: Available (was: Untriaged)
therealbenwiley@, what's the timezone setting of your Android OS?


Hey @tkent@chromium.org, just saw your message... I gave it to you before! :) It's GMT-04:00 EDT.

Sign in to add a comment