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/datepull/2877/head
parent
70dc8d71c0
commit
0cfbcedd84
Loading…
Reference in New Issue