The problem with Moment is that it has a big size in bundles. Date-fns was created to mitigate that problem by allowing better tree shaking. Suggestion: replace moment with date-fns.
Moment was removed in v2.0.0. This should resolve your concerns,
Thank you :-)!
In our project, we use Moment.js extensively. Changing Moment.js to Date-fns in react-datepicker only adds up to the application footprint. Is it possible to make it a drop-in dependency, so we could use new version of this great component and keep Moment.js without replacing it with date-fns, or adding another dependency and making overall application bundle even bigger than before?
I'm happy to support that path if you can help to get there. Ideally, the datepicker would support multiple date engines so you can use the date engine that works best with the rest of your app.
Most helpful comment
In our project, we use Moment.js extensively. Changing Moment.js to Date-fns in react-datepicker only adds up to the application footprint. Is it possible to make it a drop-in dependency, so we could use new version of this great component and keep Moment.js without replacing it with date-fns, or adding another dependency and making overall application bundle even bigger than before?