I'm facing difficulty highlighting three specific dates: "10-11-2020", "22-11-2020", and "07-11-2020" using React.js and Datepicker. Unfortunately, my attempts have not been successful so far. Here is the code snippet I am working with:
import React, {useState} from "react";
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
const Datepicker = (props) => {
const [startDate, setStartDate] = useState(new Date());
return (
<DatePicker
className="custom-select"
dateFormat="dd/MM/yyyy"
selected={startDate}
highlightDates={["10-11-2020","22-11-2020", "07-11-2020"]}
/>
);
};
export default Datepicker;
You can find my code here : https://codesandbox.io/s/unruffled-wescoff-mfpgj?file=/src/App.js
I would appreciate any assistance in resolving this issue. Thank you!