Solvedreact dates Uncaught TypeError: modifiers.has is not a function

I get this error when click next month on DateRangePicker,

Uncaught TypeError: modifiers.has is not a function
at getCalendarDaySettings (getCalendarDaySettings.js?01ee:25)

23 Answers

✔️Accepted Answer

Hey all,

We ran into this one as well and it boiled down to a deepmerge dependency (repo).

In our app we're using deepmerge@2.1.1 (latest).
However,
react-dates -> react-with-styles -> react-with-direction -> deepmerge@1.5.2

This causes some conflict which results in the .has() error outlined above. Seems as though the older version of deepmerge can handle Sets, but the newest version cannot. Downgrading to deepmerge@1.5.2 on our end resolved this issue for us. Odd dependency problem, though...