-
Notifications
You must be signed in to change notification settings - Fork 3
Description
We use react-date-range to display a calendar-style view in analytics so users can choose the start date and end date precisely.
The issue
The dependency react-date-range has been un-maintained for lack of time by the developers. This only affects update to dependencies as the core code is reliable.
In our case this impacts the use of date-fns@v3 in the peerDeps of react-date-range. We currently pin the date-fns dependency to v4 in the package.json but this could lead to issues with future deprecations.
Solution 1
Fork the repo, make the appropriate changes to update the dependencies.
This now means we own that code and need to invest time to maintain it.
Solution 2
In our specific use-case I think we can get by with providing pre-defined time intervals (yesterday, 1day, this week, 7 days, this month, 1 month, 6 month, this year, 1 year) and then arrows to move that time range (up or down). This would result in the same date ranges that the backend understands but provide more semantic accurate date to the user.