react-tailwindcss-datepicker icon indicating copy to clipboard operation
react-tailwindcss-datepicker copied to clipboard

How to disable weekends ?

Open athimannil opened this issue 1 year ago • 0 comments

There is option to disable specific dates

<Datepicker
  disabledDates={[
    {
      startDate: "2023-02-02",
      endDate: "2023-02-05",
    },
    {
      startDate: "2023-02-11",
      endDate: "2023-02-12",
    },
  ]}
  startFrom="2023-02-02"
  value={value}
  onChange={handleValueChange}
/> 

Is there option to disable all the weekends (Saturday and Sunday) ?

With like Date.getDay() === 0 || Date.getDay() === 6)

athimannil avatar Nov 14 '23 17:11 athimannil