react-date-range
react-date-range copied to clipboard
Range error in safari
Subject of the issue
Works fine on chrome but crashes in safari m1 pro.
[BUG] Bug Reproduce Steps
use it in safari that's it.
[BUG] Expected behaviour
Environment
Package Version: 1.4.0 React version: 18.2.0 Node version: 18.15.0 Browser: Safari Version 17.0 (19616.1.27.211.1)
Please provide the sample code for replicating the error. Which component did you use and what were the props.
Try this
setRange([ { startDate: new Date(formattedStartDate.replace(/-/g, "/")), endDate: new Date(formattedEndDate.replace(/-/g, "/")), key: "selection", }, ]);