docs: fix invalid disabledDate of RangePicker demo (#27112)

* docs: fix invalid disabledDate of RangePicker demo

Close https://github.com/ant-design/ant-design/issues/26885

* Update select-in-range.md

Co-authored-by: 偏右 <afc163@gmail.com>
This commit is contained in:
JuniorTour 2020-10-20 22:03:02 +08:00 committed by GitHub
parent 27e9926438
commit 87dba05e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,9 @@ const App = () => {
<RangePicker
disabledDate={disabledDate}
onCalendarChange={value => {
setDates(value);
const [start, end] = value;
const [oldStart, oldEnd] = dates;
setDates([start || oldStart, end || oldEnd]);
}}
/>
);