fix(components): [date-picker] keep disabled-date reactive in panels - #24708
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe date-picker panels now keep ChangesDate-picker disabled-date reactivity
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The change keeps runtime Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
|
Size Change: +131 B (+0.01%) Total Size: 1.45 MB 📦 View Changed
ℹ️ View Unchanged
|
|
🧪 Playground Preview: https://element-plus.run/?pr=24708 🔖 Commit: |
patienry
left a comment
There was a problem hiding this comment.
Other pickers also have this issue (e.g. type="date"). It would be better to make the change consistently across all picker types.
|
Good catch, thanks. Extended it.
Added two regression tests: |
disabled-date reactive in panels
|
@lazerg Thanks for your contribution! ❤️ |

Please make sure these boxes are checked before submitting your PR, thank you!
devbranch.fix #24697
fix #12633
panel-date-range.vueanduse-panel-date-range.tsboth pulldisabledDateoffpickerBase.propsby destructuring, which snapshots the function once and drops reactivity. Replacing adisabled-dateat runtime on a range picker therefore keeps the old predicate forever. Switched both totoRef(pickerBase.props, 'disabledDate'), the same thing the neighbouringformat/shortcuts/defaultValuelines already do.Extended the same fix to
panel-date-pick.vue,panel-month-range.vue,panel-year-range.vue, andpanel-quarter-range.vue, which had the identical destructure bug and were flagged in review.Summary by CodeRabbit
Bug Fixes
Tests