skip to Main Content

Reactjs – Highlight dates on react-datepicker

I have an array of dates in "MM/DD/YYYY" format. But passing this array via the hightlightDates prop to react-datepicker is not highlighting the days on the calendar. How can I accomplish this? <DatePicker showIcon selected={startDate} customInput={<CustomInput />} onChange={(date) => setStartDate(date)}…

VIEW QUESTION

Reactjs – react-datepicker throws error invalid time value

Error image const [startTime, setStartTime] = useState(moment(new Date()).toDate()); <DatePicker showIcon selected={startTime} onChange={(date) => handleStartDateChange(date)} dateFormat="MM-dd-yyyy" maxDate={moment(startTime).toDate()} placeholderText="Select a date" className='margin-bt5' /> This my date picker component when i trying work on mobile responsive it's throws error invalid time value. same…

VIEW QUESTION

react-datepicker css selected range

I am implementing: react-datepicker: https://www.npmjs.com/package/react-datepicker My expected: But, when I change start-date and end-date, I changed border-radius for start-date and end-date, and this is my result: Link to try: https://codesandbox.io/s/crazy-snow-sm2z62?file=/src/App.js My problem is: doesn't have background around start-date and end-date

VIEW QUESTION
Back To Top
Search