Closed Bug 1370671 Opened 4 years ago Closed 4 years ago

Datepicker shows incorrect month for the first day of the month


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

55 Branch
Not set



Tracking Status
firefox55 --- fixed


(Reporter: dsmith, Assigned: scottwu)



(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.

Great! Thanks!
Attachment #8875552 - Flags: review?(mconley) → review+
Thanks Mike!
Keywords: checkin-needed
Pushed by
DateTimeFormat timeZone set to UTC to show correct year-month header for datepicker. r=mconley
Keywords: checkin-needed
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.