Closed semihraifgurel closed 6 months ago
If you downgrade the version of date-fns to 2.30.0 it works.
Been getting this past few days. Finally found that its an incompatibility with the newer date-fns. Probably because they use require("date-fns/addYears") instead of require("date-fns"). addYears is in the date-fns folder now instead of its own folder. same with other functions. Is it ok to break things like that? re date-fns devs. There's also no .default as far as I could tell.
Anybody have a solution yet?
Anybody have a solution yet?
install date-fns version 2.30.0, then delete your node modules, install it again and it is working for me.
Anybody have a solution yet?
install date-fns version 2.30.0, then delete your node modules, install it again and it is working for me.
Thanks! It worked for me.
Okay, I wanted to use the latest date-fns
and this package was not compatible. I forked this repo and changed it to work with the latest date-fns
. In case you want to use it: https://www.npmjs.com/package/@umakantp/react-date-range
@semihraifgurel @Tembew @ty-codes @Aakashgupta2001 @umakantp
can you please try latest version? https://www.npmjs.com/package/react-date-range/v/2.0.0-alpha.3 that should be working with date-fns@3
I'd like to make it an official release after we get enough feedback
Seems to be working for what I needed it for.
Works for me as well. Any plans to make this an official release instead of alpha?
@semihraifgurel @Tembew @ty-codes @Aakashgupta2001 @umakantp
can you please try latest version? https://www.npmjs.com/package/react-date-range/v/2.0.0-alpha.3 that should be working with date-fns@3
I'd like to make it an official release after we get enough feedback
Thank you so much!
I just released version 2.0.1 @bensampaio @fbenfraj @Tembew
Se você fizer o downgrade da versão do date-fns para 2.30.0, ele funcionará.
working for me, ty
(0 , _addYears.default) is not a function
react-date-range not working with date-fns@3.0.1
[BUG] Bug Reproduce Steps
Codesandbox
Environment
Package Version: 1.4.0 React version: 18.2.0 Node version: Browser: