Input type date with min max set opens datepicker at current month, if min max in current year.
Categories
(Toolkit :: UI Widgets, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr91 | --- | unaffected |
| firefox-esr102 | --- | wontfix |
| firefox-esr115 | --- | wontfix |
| firefox-esr128 | --- | wontfix |
| firefox103 | --- | wontfix |
| firefox104 | --- | wontfix |
| firefox105 | --- | wontfix |
| firefox106 | --- | wontfix |
| firefox107 | --- | wontfix |
| firefox132 | --- | wontfix |
| firefox133 | --- | wontfix |
| firefox134 | --- | fixed |
People
(Reporter: matrim20, Assigned: jfkthame)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
Opens always in current month:
<input type="date" min="2022-04-05" max="2022-04-08">
Opens in corrent month:
<input type="date" min="2021-04-05" max="2021-04-08">
Tested on date 2022-07-05.
Presumed reason: If intended year equals current year, the datepicker UI always uses the current month, instead of the intended month.
Actual results:
First line opens the datepicker displaying July 2022.
Second line opens the datepicker displaying April 2021.
Attached screenshot displays the current state.
Expected results:
First line opens the datepicker displaying April 2022.
Second line opens the datepicker displaying April 2021.
(In comparison: Chrome 103 opens both in the correct month)
Comment 1•3 years ago
|
||
I've managed to reproduce this issue on the latest versions Nightly 105.0a1 and Firefox 103.0.1 on Windows 10 x64.
Setting this to NEW. If this is not the correct component, please feel free to change it to a more appropriate one.
Narrowed down the regression range to:
Last good revision: bfbef2b417a1bfd26a4ce3b5d1f062d8266edb91
First bad revision: 8262d23cdf85c12d77ab69eaf56feba6c76c36d8
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=bfbef2b417a1bfd26a4ce3b5d1f062d8266edb91&tochange=8262d23cdf85c12d77ab69eaf56feba6c76c36d8
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
|
||
https://searchfox.org/mozilla-central/source/toolkit/content/widgets/datekeeper.js#107 doesn't look right to me.
Maybe we should just change the line to
selectedMonth = Math.min(Math.max(month, minMonth), maxMonth);
Comment 3•3 years ago
|
||
Set release status flags based on info from the regressing bug 1728366
Updated•3 years ago
|
Updated•3 years ago
|
Comment 4•3 years ago
|
||
(In reply to Hsin-Yi Tsai (she/her) [:hsinyi] from comment #2)
https://searchfox.org/mozilla-central/source/toolkit/content/widgets/datekeeper.js#107 doesn't look right to me.
Maybe we should just change the line to
selectedMonth = Math.min(Math.max(month, minMonth), maxMonth);
Mark, it seems that we have a clue about the root of the problem, could you help find an owner? Thanks
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Updated•3 years ago
|
Comment 8•3 years ago
|
||
Backed out changeset fe7c0cde6cb6 (Bug 1778086) for causing bc failures on browser_datetime_datepicker.js.
Backout link
Push with failures <--> bc3
Failure Log
Updated•3 years ago
|
Updated•3 years ago
|
Comment 9•3 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:mstriemer, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.
Comment 10•3 years ago
|
||
Clearing review request - I suspect mstriemer will get to this when he gets to this.
Comment 11•2 years ago
|
||
Someone should fix this... it's annoying to have to make hack-y workarround to solve this problem. This issue does not occur on any of the other major browsers.
| Assignee | ||
Comment 13•1 year ago
|
||
:mstriemer, I ran across this and have taken the liberty of stealing your patch and (I hope) fixing up the issue that resulted in test failures last time (comment 8). I'll post the updated version for your review.
| Assignee | ||
Comment 14•1 year ago
|
||
(Updated version of mstriemer's patch in D159725.)
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Comment 15•1 year ago
|
||
Comment 16•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•