Calendar With Children

import { useState } from "react"
import { Calendar } from "react-multi-date-picker"

export default function Example() {
  const [value, setValue] = useState(new Date())

  return (
    <Calendar
      value={value}
      onChange={setValue}
    >
      <button
        style={{ margin: "5px" }}
        onClick={() => setValue(undefined)}
      >
        DESELECT
      </button>
      <button
        style={{ margin: "5px" }}
        onClick={() => setValue(new Date())}
      >
        TODAY
      </button>
    </Calendar>
  )
}

DatePicker With Children

import DatePicker from "react-multi-date-picker"

export default function Example() {
  return (
    <DatePicker>
      <button
        style={{ margin: "5px 0" }}
        onClick={() => alert("clicked")}
      >
        click me
      </button>
    </DatePicker>
  )
}