【发布时间】:2020-01-06 20:37:06
【问题描述】:
【问题讨论】:
【问题讨论】:
您可以添加下一个/上一个按钮,例如:
const [date, setDate] = useState(dayjs());
<Calendar validRange={[dayjs(props.params.startDate), dayjs(props.params.endDate)]}
value={date}
headerRender={() => (
<Row justify="space-between" className="p-1">
<Button type="link" onClick={() => setDate(dayjs())}>
Today
</Button>
<Button type="link" onClick={() => setDate(date.add(-2, 'months'))}>
Next Month
</Button>
<Button type="link" onClick={() => setDate(date.add(2, 'months'))}>
Previous Month
</Button>
</Row>
)}
}/>
你也可以使用 moment()
【讨论】: