Update date-fns dependency from 3.6 to 4.1

Author: MurzNNCreated Aug 1, 2026Updated Aug 1, 2026

Is your feature request related to a problem? Please describe. The date-fns is a popular library, and many packages requires it. But the most of other packages require date-fns version 4.1 but react-datepicker - still requires 3.6. The size of the library is pretty large (around 75mb), so it's better to reuse the same 4.1.x version of the library for all projects, than having both of them in the project as dependencies.

Describe the solution you'd like To resolve this issue, we can upgrade the dependency to ^4.1 if there are no significant breaking changes.

Source: Hacker0x01/react-datepicker