-
-
Notifications
You must be signed in to change notification settings - Fork 50.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Calendar validRange prevents disabledDate #25626
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 982d9ce:
|
CI 报错 react-intl 没安装? |
: false; | ||
return inRange || !!disabledDate?.(date); | ||
}, | ||
[disabledDate, validRange], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你这个为啥会被格式化成这样,差点没看懂 😂😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
提到外面来的话就直接用 useCallback 吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
changelog 填写一下,CI 先不用管 |
这个 issue 是说少了一个选项,这个变动看起来只是重构了 disabledDate 逻辑。没有修复 month select 少选项的问题 |
@@ -110,7 +110,7 @@ function MonthSelect<DateType>(props: SharedProps<DateType>) { | |||
|
|||
const months = locale.shortMonths || generateConfig.locale.getShortMonths!(locale.locale); | |||
const options: { label: string; value: number }[] = []; | |||
for (let index = start; index < end; index += 1) { | |||
for (let index = start; index <= end; index += 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加个测试用例
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
🤔 This is a ...
🔗 Related issue link
close #25382
close #25633
close #25606
💡 Background and solution
📝 Changelog
Fix Calendar month select display
修复 Calendar 组件 MonthSelect 月份下拉筛选
☑️ Self Check before Merge