analytics/assets/js/dashboard/util
Vini Brasil 0cfbcedd84
Fix date picker shifting day bug (#2848)
* 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`.

* 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.

* Hide dayjs usage in util/date
2023-04-25 12:26:24 +01:00
..
date.js Fix date picker shifting day bug (#2848) 2023-04-25 12:26:24 +01:00
filters.js Filter modal refactor (#2806) 2023-04-05 16:20:35 +01:00
number-formatter.js Use generic ListReport for pages (#1505) 2021-12-03 13:59:32 +02:00
realtime-update-timer.js Realtime dashboard improvements (#2445) 2023-01-02 17:42:57 +02:00
seconds-since-last-load.js Last updated tooltip (#2576) 2023-01-16 10:30:22 +02:00
storage.js Use generic ListReport for pages (#1505) 2021-12-03 13:59:32 +02:00
tooltip.js Add boundary to tooltip (#2211) 2022-09-13 12:46:01 +03:00
url.js Use generic ListReport for pages (#1505) 2021-12-03 13:59:32 +02:00