mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
docs: 7 is not 7 (#47342)
This commit is contained in:
parent
2455128e73
commit
364bb0c40b
@ -1,7 +1,7 @@
|
||||
## zh-CN
|
||||
|
||||
使用 `changeOnBlur` 配合 `onCalendarChange` 和 `disabledDate` 来限制动态的日期区间选择。
|
||||
使用 `disabledDate` 的 `info.from` 来限制动态的日期区间选择。
|
||||
|
||||
## en-US
|
||||
|
||||
Using `changeOnBlur` work with `onCalendarChange` and `disabledDate` to limit date selection.
|
||||
Using `info.from` of `disabledDate` to limit the dynamic date range selection.
|
||||
|
@ -12,7 +12,7 @@ const App: React.FC = () => {
|
||||
|
||||
const disabledDate: DatePickerProps['disabledDate'] = (current, { from }) => {
|
||||
if (from) {
|
||||
return Math.abs(current.diff(from, 'days')) > 7;
|
||||
return Math.abs(current.diff(from, 'days')) >= 7;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user