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 |
bombillazo
left a comment
There was a problem hiding this comment.
There might be a fix needed for this.
| onSelect={onInternalSelect} | ||
| onSelect={(nextDate) => { | ||
| onInternalSelect(nextDate, 'date'); | ||
| }} |
There was a problem hiding this comment.
I believe this should be like this:
onSelect={(nextDate) => {
onInternalSelect(nextDate, panelMode === 'date' ? 'date' : 'month');
}}There was a problem hiding this comment.
@bombillazo
How about:
onSelect={(nextDate) => {
onInternalSelect(nextDate, panelMode);
}}There was a problem hiding this comment.
There was a problem hiding this comment.
Thanks for the reference.
There was a problem hiding this comment.
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
onSelectsupportinfo.sourceparam to help get select source.onSelect支持info.source参数以获取选择来源。☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 80c155a
Added a new feature to the
Calendarcomponent that allows users to access the source of the date selection, such as 'date', 'keyboard', or 'customize'. Enhanced theonSelectandonValueChangeprops with a second parameterinfoof typeSelectInfoto pass the source information. Updated the tests and the documentation accordingly.🔍 Walkthrough
🤖 Generated by Copilot at 80c155a
onSelectprop of theCalendarcomponent to indicate the source of the date selection (link, link, link, link, link, link, link, link, link, link, link)Calendarcomponent to pass the second parameter to theonSelectprop (link, link, link, link, link, link)generateCalendar.tsxandHeader.tsxto follow the alphabetical order (link, link, link)