DatePicker: Clear button not working
Describe the bug
The clear button in the DatePicker component is not resetting the selected date.
Pull Request Link
fix(DatePicker): update clear button to use defaultValue instead of formDefaultValue #7736
Reproducer
https://primevue.org/datepicker/#button
Environment
Latest PrimeVue 4.3.4
Vue version
3
PrimeVue version
4.3.4
Node version
22.15.0
Browser(s)
Chrome
Steps to reproduce the behavior
Use DatePicker with "showButtonBar" and try to click on the "clear" button.
Expected behavior
It should clear the input field.
Any chance this is going to be merged soon?
Waiting for this too
Waiting for this too!
Waiting for this too!
We experienced this issue as well and had to downgrade to the following versions:
"primevue": "4.3.3",
"@primeuix/themes": "1.0.3"
Waiting for it too. Would be great if the clear button works as expected. On the usability site it is useless like this
We'll discuss for 4.3.10, thank you for the feedback.
We'll discuss for 4.3.10, thank you for the feedback.
Please do that, but what's the hold-up? I'm waiting for the fix.
It's not that I want my change included. The change is so simple that there are certainly better ways to do it.
I'm waiting for the fix too.
As a temporary solution, I created a wrapper component around the DatePicker, where I access the clear button and its actionCallback using named templates.
I wrote my own onClear function, which clears the input model and then triggers the native actionCallback (to close the dropdown).
Thanks for fixing but we could really do with a release now...