onefinestay/react-daterange-picker

Setting dateStates or stateDefinitions causes error

Opened this issue · 1 comments

I was thinking to separate my problem from #196

When setting dateStates or stateDefinitions, I get the following error message:

I replicated it here, check it out:

Edit yj35o0kz99

@balazsorban44 It seems that you're missing the defaultState prop:

 <DateRangePicker
          defaultState="available"
          ....
 />

The default state is a value from your date states. I'd be happy to accept a PR to better validate this / provide a better error 👍