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

Fix date picker shifting day bug #2848

Merged
merged 3 commits into from
Apr 25, 2023
Merged

Fix date picker shifting day bug #2848

merged 3 commits into from
Apr 25, 2023

Commits on Apr 25, 2023

  1. Fix date picker shifting day bug

    This commit fixes a bug where picking a specific date in custom range
    takes you to the stats of the day before.
    
    This was caused because Flatpickr returns a Date instance, and we were
    trying to parse this Date instance into day.js using the `utc` function,
    assuming it was a ISO-8601 string.
    
    This commit fixes it by casting Date into dayjs using the `dayjs`
    function instead of `utc`.
    vinibrsl committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    06b95c7 View commit details
    Browse the repository at this point in the history
  2. Fix invalid date Flatpickr bug

    This commit fixes a bug where the Flatpickr was not setting the minDate
    correctly based on statsBegin. This was failing because parseUTCDate is
    now returning a day.js instance, and Flatpickr cannot handle that type.
    vinibrsl committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    d8c2232 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    41aa321 View commit details
    Browse the repository at this point in the history