Open Bug 1338203 Opened 7 years ago Updated 2 years ago

[DateTimeInput] End key does not select the last date for the displayed month

Categories

(Core :: Layout: Form Controls, defect, P3)

54 Branch
defect

Tracking

()

Tracking Status
firefox54 --- affected

People

(Reporter: roxana.leitan, Unassigned)

References

(Blocks 1 open bug)

Details

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID:20170208030203

[Affected versions]:
Nightly 54.0a1

[Affected platforms]:
All platforms: Ubuntu 16.04, Mac OS X 10.11, Windows 10

[Steps to reproduce]:
1.Launch Nightly 54.0a1 with a new profile
2.Set "dom.forms.datetime" and "dom.forms.datetime.timepicker" pref to True in about:config
3.In the URL bar enter "data:text/html, <input type="date">"
4.Choose month February and year 2017
5.Move focus to day segment
6.Press End key

[Expected result]:
End key should select the last date in the month displayed. (e.g. 28 for February)

[Actual result]:
The value for date is 31
I remember, for simplicity, we just set it to 31, because the last day depends on month and year, which we may not have at the time user press the end key in day field. Another case is, user may still change the month or year after selecting the last day.

This is how Chrome works (using up/down key) as well.

Ni? UX to confirm this.
Flags: needinfo?(mochen)
Yes, as Jessica mentioned, we had a discussion before and decided to fix the maximum number as 31 no matter what month is. The main reason was to simplify the mechanism after considering the engineering effort, the visual consistency, and usability. Please let me know if any questions, thanks.
Flags: needinfo?(mochen)
backlog it per comment 1 and comment 2
Priority: -- → P3
Component: XUL Widgets → Layout: Form Controls
Product: Toolkit → Core
Summary: [DateTimePicker] End key does not select the last date for the displayed month → [DateTimeInput] End key does not select the last date for the displayed month
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.