wojtekmaj/react-daterange-picker

Issue with setting Starting ranges for the DateRangePicker

alexlin51 opened this issue · 2 comments

Hi,
Sorry if this post lacks lots of information but this is my first time posting in an issue section.

I have a state that takes in data from props.

// start = '10/20/20'  end = '10/21/20'
const {start, end} = props
const [range, setRange] = useState([new Date(start), new Date(end)])

This is connected to the component as such:

 <DateRangePicker
    onChange={setRange}
    value={range}
/>

When I load this component, I get an error every time. I am not too sure how to fix this or if I am doing something incorrectly.
Here are my errors.
Screenshot (31)
Screenshot (30)
Thanks for the help! Also, I'd appreciate any feedback on how to write better issue requests!

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

This issue was closed because it has been stalled for 14 days with no activity.