I did some online research but couldn't find a clear answer. However, I came across this article ->
Since I didn't quite understand the solution provided, I decided to come up with my own inspired by it.
detectClick() {
this.clickCount += 1;
if (this.clickCount === 1) {
var singleClick = setTimeout(() => {
console.log("we are in singleClick");
this.currentPickerDate();
this.clickCount = 0;
}, 500);
}
if (this.clickCount === 2) {
console.log("we are in double Click");
clearTimeout(singleClick);
this.showEvent();
this.clickCount = 0;
}
}
Here is the component:
<v-date-picker
v-model="date"
@click:date="detectClick"
:events="allEvents"
:picker-date.sync="pickerDate"
event-color="red lighten-2">
</v-date-picker>
I don't believe currentPickerFunction is necessary, but let me know if you think otherwise. I'm having trouble with the setTimeout function in the detectClick function, and any better solutions would be appreciated. Thanks!
I am using vue 2 and vuetify