Closed laferte-tech closed 3 years ago
@GrandOurs35 I am running into the same issue, I tried this this.$refs.my_ref.$options.parent.$refs.calendar
but got back that move is not a function
It could be a timing issue. When using a slot, the calendar ref element won't exist until the popover is displayed.
If the picker is displayed inline (without a slot), the calendar is always visible, so the ref element will always exist.
Are you trying to move right when the calendar popover is displayed? Or some time after that?
FYI...the next version will add a move
function to the date picker as a simple wrapper for the calendar method. The same conditions explained above will apply. It will just be easier to call this.$refs.pick.move()
in the future.
I too am having this issue - I eventually dug it out with this.$refs.datePicker.$refs.calendar.focusDate(val.end)
as an inline element. Glad to see there will be a wrapper added, thanks!
The wrapper was added in 2.1.1
. Going to close this issue upon further feedback or replication repo.
Hi, I have updated to the new version and i have a trouble to use the move method. Not sure it's a bug but when i use DatePicker without this slot (the one you gave on your doc):
i can use the move method like this:
this.$refs.pick.$refs.calendar.move(my date);
but when i add the template with the slot, it's not working anymore. VueJs tells me that is an undefined function. Do you have any idea how to solve this please? Is it possible to use, in the same time, the move method and the datepicker with the input slot? Thanks a lot