Vuepic / vue3-date-time-picker

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

Add stopImmediatePropagation() method to all events that listens to click action #29

Closed MohamedHana closed 3 years ago

MohamedHana commented 3 years ago

Is your feature request related to a problem? Please describe. I am using the datepicker inside a bootstrap dropdown menu and for any click action on the calendar (ex. select a day from the calendar, or change to month/year views) the click event propagates and closes the dropdown menu (parent container of the datepicker component).

Describe the solution you'd like Can we add e.stopImmediatePropagation() to all events which triggered by click action? I added it manually to vue3-date-time-picker.esm.js file

t("div",{role:"gridcell",class:"dp__calendar_item",key:o+s,onClick:e=>{e.stopImmediatePropagation();r.$emit("selectDate",n)},

and it worked as expected.

Describe alternatives you've considered I don't consider alternatives for now.

Additional context

Issue: https://drive.google.com/file/d/1VkypEwg2IBucVFJhn-HuLFTWGBprsLvQ/view?usp=sharing

After manually adding stopImmediatePropagation() method to selectDate event: https://drive.google.com/file/d/12biokxxg2vqOF7S3g2ot8Zjhhotv5AO7/view?usp=sharing

Jasenkoo commented 3 years ago

I will add in the next version

MohamedHana commented 3 years ago

Thank you @Jasenkoo, much Obliged.

Jasenkoo commented 3 years ago

The issue is fixed in the new version 2.3.1