Props
Prop | Type | Default |
---|---|---|
position | String | "right" |
disabled | Boolean | false |
className | String | |
sort | Array | ["today", "deselect", "close"] |
names | Object | en:
fa:
|
Default Toolbar
import React, { useState } from "react"
import Toolbar from "react-multi-date-picker/plugins/toolbar"
.
.
.
const [value, setValue] = useState()
.
.
.
<DatePicker
value={value}
onChange={setValue}
plugins={[
<Toolbar position="bottom" />
]}
/>
Sorting Buttons
import React, { useState } from "react"
import Toolbar from "react-multi-date-picker/plugins/toolbar"
.
.
.
const [value, setValue] = useState()
.
.
.
<DatePicker
value={value}
onChange={setValue}
plugins={[
<Toolbar
position="bottom"
sort={["deselect", "close", "today"]}
/>,
]}
/>
Custom Names
import React, { useState } from "react"
import Toolbar from "react-multi-date-picker/plugins/toolbar"
.
.
.
const [value, setValue] = useState()
.
.
.
<DatePicker
value={value}
onChange={setValue}
plugins={[
<Toolbar
position="bottom"
names={{
today: "select today"
deselect: "select none"
close: "close"
}}
/>,
]}
/>