-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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(components): [date-picker] disable button if now is disabled #13655
Conversation
🧪 Playground Preview: https://element-plus.run/?pr=13655 |
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.
Please check the test code!
Done. |
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.
Suggestion
I wish there was a test code related to the fix~
Related test cases have been added 🏓 |
…ment-plus#13655) * fix(components): [date-picker] disbale button if now is disabled * fix: test * chore: add test
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.Description
🤖 Generated by Copilot at 6375356
Add
disabled
props to date picker panel buttons. This allows users to see when the "Now" and "Confirm" buttons are not available based on thedisabledDate
andparsedValue
props of the date picker component.Related Issue
Fixes #13643.
Explanation of Changes
🤖 Generated by Copilot at 6375356
disabled
props to "Now" and "Confirm" buttons in date picker panel (link, link)disabledConfirm
anddisabledNow
computed properties to check if selected or current date is disabled bydisabledDate
prop (link, link)dayjs
library to get current date and set locale according tolang
prop inpanel-date-pick.vue
(link)