Open nktnet1 opened 2 years ago
Hi,
I believe there's an issue with the dates being duplicated in the date array passed into "onChange". This can be reproduced by:
Array will contain ["Cell A", "Cell B", "Cell A"].
Problem reproducible in sandbox: https://codesandbox.io/s/objective-pateu-y8lr0?file=/src/App.js
Currently using the following as a temporary workaround:
const [schedule, setSchedule] = React.useState([]) // ... const handleChange = (newSchedule) => { // setSchedule(schedule) // has duplicates - below will filter date to be unique. setSchedule([...new Set(schedule.map(date => +date))].map(timestamp => new Date(timestamp))); }
Thanks :) - Really appreciate your work!
Hi,
I believe there's an issue with the dates being duplicated in the date array passed into "onChange". This can be reproduced by:
Array will contain ["Cell A", "Cell B", "Cell A"].
Problem reproducible in sandbox: https://codesandbox.io/s/objective-pateu-y8lr0?file=/src/App.js
Currently using the following as a temporary workaround:
Thanks :) - Really appreciate your work!