Consider migrating to day.js || date-fns instead of moment.js

Reasons here:
https://github.com/you-dont-need/You-Dont-Need-Momentjs/blob/master/README.md
And here:
https://momentjs.com/docs/#/-project-status/

Bump!

I don’t see why it would be needed to migrate. For modern frameworks where you build your code and want to make use of modules and tree shaking you probably will want to use one of the newer libraries. Moment still has the most functionality and will receive security fixes, they only will not modernize it for the newer frameworks and bundlers. For App Connect it is currently the best library until we also move to ESM modules and bundle our code. An other reason is that our datepicker (based on Date Range Picker — JavaScript Date & Time Picker Library) requires the moment library.

1 Like

So, maybe consider to replace or at least as a second option https://github.com/flatpickr/flatpickr instead of https://www.daterangepicker.com

The current daterangepicker.com has 2 heavy dependencies:

  • jquery/latest/jquery.min.js | 85kb
  • momentjs/latest/moment.min.js | 350kb with locales

And Flatpickr | 65kb:

  • Dependency-free
2 Likes