DatePicker: toggleCallback missing on dropdownbutton slot #6543
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
I think that toggleCallback is missing on the dropdownbutton slot for DatePicker, so there is no way to trigger the opening of the calendar when using a custom button.
If I output slotProps from within the template I just get: { key: 1 }
Looking at the code for DatePicker.vue 4.1.0, line 35 is:
<slot v-if="showIcon && iconDisplay === 'button' && !inline" name="dropdownbutton">
I believe this should look something like the following:
<slot v-if="showIcon && iconDisplay === 'button' && !inline" name="dropdownbutton" :toggleCallback='onButtonClick'>
(I don't know much about building these libraries, so I may be way off base on the cause here.)
Reproducer
https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-qgmkpu?file=src%2FApp.vue
PrimeVue version
4.1.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
Declare template, something like:
Expected behavior
toggleCallback is available on the slot for dropdownbutton, I can call it and the calendar opens.
The text was updated successfully, but these errors were encountered: