fitbit-web-ui-app
fitbit-web-ui-app copied to clipboard
Can't select today's or yesterday's date in Date picker
The website (https://fitbit-report.arpanghosh.com/ - for me, right now) defaults to 2021-12-27 -> 2023-12-16, it is currently 2023-12-18, so it is missing two days of data, and there is no way to select today's date...
(https://fitbit-api-web-ui.onrender.com/ Is broken in the same fashion except for a different range.)
Smaller issue is that clicking the second field shows date picker from the first field, i.e. clicking 2023 field shows 2021 date making me have to scroll for two years.
Because of the above issue, there is no way to know which year is actually selected here. It would be better if the text just fit the box so it were always visible in the first place.
The issue is the local time zones and Fitbit syncing with its own server. My server sits at a different time zone than yours, and sending an API request with the future date broke everything. As this project is focused on long-term trend visualization, I decided to remove 48 hours from the current time selection so everything works fine no matter which time zone the client is from. That is not a bug; it's a deliberate choice I made to avoid issues.
You are right on the UI part though, I can make them wider with CSS to they are more visible. Thank you for suggesting that.
The two sites are deployed from two different branches. One with experimental ( longer time span ) and the other one with 2-year max span. The selection rage works accordingly.
You are right on the UI part though, I can make them wider with CSS to they are more visible. Thank you for suggesting that.
Could you please keep the issues that still need to be worked on open? It's making it a bit hard to track and test when it actually gets fixed if everything is closed before committing the fixes.
One with experimental ( longer time span ) and the other one with 2-year max span. The selection rage works accordingly.
Would be nice to mention that in the readme :)
My server sits at a different time zone than your [client]
Why would that matter for requesting data from Fitbit API?
The selection rage works accordingly
But the issue is that no matter if you click the left date box or the right date box, it always chooses the currently-chosen month as the left box, even if you click on the right box.
I.e.
[ 2021-01 ] [ 2023-12 ]
Click left -> opens Jan 2021
Click right -> opens Jan 2021
Clicking right should open December 2023
Why would that matter for requesting data from Fitbit API?
- Some data points are returned as local time zones and also the server time can be ahead of your actual time ( resulting in requesting data from future )
I was able to get the data for today from the API after getting rid of the two - 1 day workarounds, I think it'd be better to fix the timezone issue rather than have this workaround applied.
If the issue happens because server has a timezone disconnect with client that somehow needs to be communicated to the API, can't the client just inform the server of its timezone?