React-dates: Firefox displaying October 15th two times

Created on 2 Sep 2016  路  11Comments  路  Source: airbnb/react-dates

I was just testing this using the github pages and realized that when the calendar is opened using Firefox (48.0.2), it is displaying two times the "October 15th" day. Here is a screenshot:

2016-09-02_14-37-24

I don't know if it has something to do with my timezone but I'm running this at BRT Timezone (GMT-03:00).

I'm running this using a windows machine, but I tested that in Firefox developer edition (in a Mint VM) and I can reproduce the problem.

If you need more info, just tell me! :)

Most helpful comment

Courtesy of my coworker, @mstorus:
Mark: How many datepicker issues would you say you've been dealing with today?
Me: I don't know, a lot?
Mark: Would you say it's been... a B(r)azillion?

All 11 comments

This is likely because in Brazil, daylight savings time hits at midnight instead of 2AM - the fix is likely to use a time on our moment objects of 2:01 AM rather than midnight?

Yep, daylight saving time will start at October 16th (http://www.timeanddate.com/time/change/brazil/brasilia). I've done some tests, I don't know if you can use moment.utc in function getCalendarMonthWeeks, because I think that solves this issue:

2016-09-02_15-16-52

In the screenshot, you can see that Array[8] is the "wrong" output. You can see that when using moment.utc, the result is correct (Array[7]). What do you think about it?

Nooooooooo. Okay. We will fix this asap.

I think this would involve a modification to https://github.com/airbnb/react-dates/blob/master/src/utils/getCalendarMonthWeeks.js

A quick question - can you repro in Safari, Chrome, or any other browser or is this FF specific?

@majapw, sure! I tested that on Chrome and everything is ok, I will try to install Safari here to see if it is a problem, but I think it is FF specific.

@majapw, it also happens on Safari (Version 9.1.2 (11601.7.7)) and IE 11 (Version 11.0.9600.18376).

Sweet I can repro by changing my time zone. I will dig into it. :)

Also:
https://github.com/moment/moment/issues/2353
https://github.com/moment/moment/issues/1440

Courtesy of my coworker, @mstorus:
Mark: How many datepicker issues would you say you've been dealing with today?
Me: I don't know, a lot?
Mark: Would you say it's been... a B(r)azillion?

@majapw hahahahahahaha

I still have this issues :) I'm using react-dates 12.6.0 and moment 2.18.1, I have a working demo in this branch https://github.com/pagarme/pilot/tree/refactor-filters/webapp/src/components/DateSelector, my computer timezone is America/Sao_Paulo.

What browser are you using? I set my timezone and looked at airbnb.com (which is running v12.6.0) and didn't see an issue. Can you (a) double-check airbnb.com on your setup and (b) send a screencap?

I am going to say I would be very surprised if this were still an issue...

(Also, could you file a new issue?)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Daniel15 picture Daniel15  路  3Comments

maciej-w picture maciej-w  路  3Comments

aaronvanston picture aaronvanston  路  3Comments

mrseanbaines picture mrseanbaines  路  3Comments

arthurvi picture arthurvi  路  3Comments