I am using component - https://github.com/chronotruck/vue-ctk-date-time-picker in my component. The problem I'm having is that I want to keep the component the same but somewhere in my component I should be able to turn it on and off, it seems the component doesn't provide any such functionality, can anyone help.
Code Sandbox - Sanbox
What I'm doing -
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
This button needs to be outside the component and should be able to open and close the selector.
Reference actual use cases are as follows
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
The toggle button should open and close the date picker.
Thanks for any help.
P粉9860280392023-09-08 07:27:05
---edit---
Add ref="pickerRef"
to your date picker component
And modify your <button>
as follows to trigger and hide the date picker.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|