DatePicker and DateRangePicker are both always controlled components. Thus if we want interactive examples in storybook with state we need to somehow keep the state in storybook.
I tried this approach: https://github.com/storybooks/storybook/blob/4b5622a1c1d8d4cc44160b659289f954e8740b13/examples/cra-kitchen-sink/src/stories/force-rerender.stories.js
Which didn't work for me, the component would rerender but somehow the value prop would not be updated.
For now I just added two versions of both components, one without and one with data filled in, but that is obviously not ideal.
DatePickerandDateRangePickerare both always controlled components. Thus if we want interactive examples in storybook with state we need to somehow keep the state in storybook.I tried this approach: https://github.com/storybooks/storybook/blob/4b5622a1c1d8d4cc44160b659289f954e8740b13/examples/cra-kitchen-sink/src/stories/force-rerender.stories.js
Which didn't work for me, the component would rerender but somehow the value prop would not be updated.
For now I just added two versions of both components, one without and one with data filled in, but that is obviously not ideal.