Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

Infinite loop when user from a different timezone adds a date filter #76

Open
FelixMalfait opened this issue Mar 26, 2017 · 0 comments
Open

Comments

@FelixMalfait
Copy link

Hi,
Opening an issue to leave a trace for anyone who would have the same problem.
Our users in France could use the date filter but a strange issue came up when they were overseas.
An infinite loop would decrease the date counter indefinitely, loading the page again and again with a different date (e.g. if the user is 2 timezones away from France, the date would change every 24/2=12 $digest cycle).
My solution was to remove date.setMinutes(date.getMinutes() - date.getTimezoneOffset()); in DateField.js since in our case we don't want to display date in the the user's tz but in the resource's tz.

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

No branches or pull requests

1 participant