Min & Max Date

Type of min & max dates can be Date, DateObject, String, or Number.

Here are some examples:

const [date, setDate] = useState(new Date().setDate(10))
.
.
.
<DatePicker
  value={date}
  onChange={setDate}
  minDate={new Date().setDate(5)}
  maxDate={new Date().setDate(15)}
/>

String

const [date, setDate] = useState("2020/12/04")
.
.
.
<DatePicker
  value={date}
  onChange={setDate}
  minDate="2020/11/20"
  maxDate="2021/01/20"
/>

Range Mode

const [values, setValues] = useState([
  new DateObject(),
  new DateObject().add(1, "day")
])
.
.
.
<DatePicker
  value={values}
  onChange={setValues}
  range
  minDate={new DateObject().subtract(2, "days")}
  maxDate={new DateObject().add(3, "days")}
/>

Only MinDate

<DatePicker
  minDate={new Date().setDate(5)}
/>

Only MaxDate

<DatePicker
  maxDate={new Date().setDate(15)}
/>