Skip to main content

buttons

Description

Optoional. Shows/hides the Today and Clear buttons in the lower part of the popup with calendars

Usage

buttons?: boolean | ("clear" | "today" | "done")[];

Parameters

  • true - adds default buttons ("clear", "today")
  • false - hides buttons

If an array is specified, each value adds a button:

  • clear - adds the Clear button
  • today - adds the Today button
  • done - adds the Done button

Default values

true; ["clear", "today"]

Example

const date = {
start: new Date(2020, 1, 1),
end: new Date(2021, 3, 3)
};

function App() {
return <DateRangePicker value={date} buttons={false} />;
}

Related article: Configuring buttons