Vuepic / vue3-date-time-picker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
159 stars 12 forks source link

Methods are not working #30

Closed videk11 closed 3 years ago

videk11 commented 3 years ago

Hello,

I am trying to use openMenu method on date-picker. When I call it on date-picker ref nothing happens. This is my code:

Template: <Datepicker ref="datePickerRef" />

Setup: const datePickerRef = ref(null);

const openDatePicker = () => { datePickerRef.value.openMenu(); };

Jasenkoo commented 3 years ago

It will be fixed in the next version

Jasenkoo commented 3 years ago

Info: This is a click outside directive issue, meaning the method works, just the click event is triggered before.

Temporary fix: if you use @click add @click.stop="openDatePicker" or if you don't call open function directly, pass an event as argument and add event.stopImmediatePropagation()

Jasenkoo commented 3 years ago

The issue is fixed in the new version 2.3.2