buttons
Description
Optoional. Shows/hides the Today and Clear buttons in the lower part of the popup with calendarsUsage
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 buttontoday
- adds the Today buttondone
- 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