-
-
Notifications
You must be signed in to change notification settings - Fork 49.9k
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
feat: Calendar onSelect
support info.source
param
#42432
Conversation
size-limit report 📦
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #42432 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 619 640 +21
Lines 11048 10847 -201
Branches 3081 2944 -137
==========================================
- Hits 11048 10847 -201
☔ View full report in Codecov by Sentry. |
Hello, when is this new feature going to be available? |
Hello, in the future version |
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 might be a fix needed for this.
onSelect={onInternalSelect} | ||
onSelect={(nextDate) => { | ||
onInternalSelect(nextDate, 'date'); | ||
}} |
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.
I believe this should be like this:
onSelect={(nextDate) => {
onInternalSelect(nextDate, panelMode === 'date' ? 'date' : 'month');
}}
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.
Welcome PR !
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.
@bombillazo
How about:
onSelect={(nextDate) => {
onInternalSelect(nextDate, panelMode);
}}
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.
Thanks for the reference.
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.
Good afternoon, you are welcome
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
resolve #39801
resolve #40407
close #41553
close #42412
📝 Changelog
onSelect
supportinfo.source
param to help get select source.onSelect
支持info.source
参数以获取选择来源。☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 80c155a
Added a new feature to the
Calendar
component that allows users to access the source of the date selection, such as 'date', 'keyboard', or 'customize'. Enhanced theonSelect
andonValueChange
props with a second parameterinfo
of typeSelectInfo
to pass the source information. Updated the tests and the documentation accordingly.🔍 Walkthrough
🤖 Generated by Copilot at 80c155a
onSelect
prop of theCalendar
component to indicate the source of the date selection (link, link, link, link, link, link, link, link, link, link, link)Calendar
component to pass the second parameter to theonSelect
prop (link, link, link, link, link, link)generateCalendar.tsx
andHeader.tsx
to follow the alphabetical order (link, link, link)