docs: 7 is not 7 (#47342)

This commit is contained in:
二货爱吃白萝卜 2024-02-05 14:10:46 +08:00 committed by GitHub
parent 2455128e73
commit 364bb0c40b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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;