Closed Bug 1370671 Opened 7 years ago Closed 7 years ago

Datepicker shows incorrect month for the first day of the month

Categories

(Core :: DOM: Core & HTML, defect)

55 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: dsmith, Assigned: scottwu)

Details

Attachments

(1 file)

Using URL: data:text/html,<input type="date" value="2017-06-01">

If the day of the month is 01, when you click on the datepicker, it shows the name of the prior month.  In the above case, it says that the datepicker is for May 2017, even though the days it shows are for June (first day of the month falling on Thursday, month is 30 days).

For the date "2017-06-02", it properly shows June 2017.  "2017-07-01" says it's still June. Etc.

In the case of "2017-01-01", it shows December 2016.
Flags: needinfo?(jjong)
Hmm, I couldn't reproduce this locally.
David, are you using Nightly? If possible, could you attach a video showing the steps and result?

+Scott to see if he knows what's going on.
Flags: needinfo?(jjong) → needinfo?(dsmith)
Yes I see the problem now. It happens on some time zones but not others (All of US time zones but not in Europe). There was a similar issue with months caused by time zones and perhaps daylight time saving (Bug 1331608). Thanks for spotting this David, a patch is coming.
Flags: needinfo?(dsmith)
Assignee: nobody → scwwu
Comment on attachment 8875552 [details]
Bug 1370671 - DateTimeFormat timeZone set to UTC to show correct year-month header for datepicker.

https://reviewboard.mozilla.org/r/146972/#review152048

Great! Thanks!
Attachment #8875552 - Flags: review?(mconley) → review+
Thanks Mike!
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/d843dbc23708
DateTimeFormat timeZone set to UTC to show correct year-month header for datepicker. r=mconley
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d843dbc23708
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: