Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker bug in firefox browser #1615

Closed
Tolitech opened this issue Jun 12, 2017 · 7 comments
Closed

Datepicker bug in firefox browser #1615

Tolitech opened this issue Jun 12, 2017 · 7 comments

Comments

@Tolitech
Copy link

Hello.
I found a bug when using the datepicker component.

Using the firefox version, the month of October is displayed with the incorrect days.

I've tested on Edge and Chrome and both are working properly.
My version of Firefox is Developer Edition.

I created a Plunker with the reproduction that occurs in Firefox and also has the image of the problem.
https://embed.plnkr.co/4WvupnKyZQ8t5oFn1G4l/

Image:
http://www.codegenerator.com.br/images/error.png

@maxokorokov
Copy link
Member

maxokorokov commented Jun 15, 2017

Hey, @Tolitech.

Unfortunately you're plunkr is not working (anymore?) for me

However the demos from the site https://ng-bootstrap.github.io/#/components/datepicker are opening fine in plunker with Firefox Developer 55.0b1 on MacOS

Could you please check your plunker?

@Tolitech
Copy link
Author

Hi, @maxokorokov.
Thanks for the answer.

Unfortunately the bug also occurs on the demo site.
I am using windows 10.

I downloaded now the latest version of firefox (54.0) and the problem is the same.
In October the days are incorrect.

Image of the demo site:
http://www.codegenerator.com.br/images/ff-error.png

Thank you.

@pkozlowski-opensource
Copy link
Member

I can't reproduce despite trying several OSX machines:
screen shot 2017-06-15 at 22 16 21

@Tolitech are you sure that you are not having any FFox extensions installed? Did you try to reproduce in the incognito mode?

Also, what is your timezone setting?

@Tolitech
Copy link
Author

@pkozlowski-opensource

I believe it's only in Firefox versions of Windows.
I have a virtual machine on Azure and I just installed Firefox again.
There was only Chrome.

I installed 64-bit version.
Same problem as 32 bit version on my machine.

I'm in São Paulo, Brazil, UTC -3:00
The virtual machine I tested is in the United States, but I can not remember exactly which region.

I'm trying to figure out some website that will emulate firefox in MacOS and Windows to know if the problem only occurs in Windows.

I do not have any extensions installed.

I'm going to try to find out something else to help, but for all indications, for now it would be the windows version.

sem titulo

@maxokorokov
Copy link
Member

Took a look in different VMs with FF Dev 54.0a2 32-bit on SauceLabs.
All Windows 7, 8.1 and 10 look OK.
Machines are in GMT.

So still can't reproduce for now...

@ymeine
Copy link
Contributor

ymeine commented Jun 30, 2017

Edits:

  • 2017-07-04T14:56:05+02:00: updated the results with Firefox stable (54) in Windows 10

So, I tested with several configurations, and here's where I reproduced the bug:

Firefox dev:

Windows 10 (VM) Window 7 (real)
UTC-3:00 ✔️
UTC

Firefox stable (54):

Windows 10 (VM) Window 7 (real)
UTC-3:00 N/A
UTC N/A N/A

I didn't investigate further yet, but the result lets think it seems to be a bug linked to the implementation of time on Windows 10 (maybe 8 too). But that's weird that Firefox stable doesn't have the issue in this case.

Procedure to reproduce the test

  • launch a Windows machine with the proper Firefox installed
  • configure the timezone
    • either using the OS settings
    • or by setting the environment variable TZ to the value GMT+3:00 (syntax and inverted sign are important)
  • launch Firefox
  • check in the Dev Tools that the timezone offset is 180 by running the code (new Date()).getTimezoneOffset()
  • then check the DatePicker normally

Sources:

Some tips to test on SauceLabs

Since the VM launches with Firefox already started, and that there is no shortcut to launch it again nor access to the disks in the file explorer, do the following:

  • open the Task Manager
  • check the path of the running Firefox executable
  • open a terminal and go to that folder

You'll be able to launch Firefox again from there after closing the previous instance. Even better, with this technique it's straightforward to apply the timezone without having to change OS settings using the procedure above.

@maxokorokov
Copy link
Member

Reproduced it locally. Using getUTCDate() instead of getDate() in the datepicker service seems to fix it. Will fix right after #1551 lands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants