-1

I want to disable the dates before event date and event date. But not able to do .Please help to fix this out. Below I am sharing my code.

eventDate = newDate("2022-07-08");
const disableCustomDt = current => {
   return !eventDate .includes(current.format('YYYY-MM-DD'));
}
<DatePicker timeFormat={false} isValidDate={disableCustomDt} />
Nidhi Mahajan
  • 81
  • 1
  • 7

1 Answers1

0

You can refer to this answer

You can compare your current date with today and return true or false