mengxiong10 / vue-datepicker-next

A datepicker / datetimepicker component for Vue3
https://mengxiong10.github.io/vue-datepicker-next/
MIT License
147 stars 34 forks source link

[Bug] Issue with datepicker pop-up being added outside overlay element #34

Open jieun94 opened 1 year ago

jieun94 commented 1 year ago

Vue2-datepicker version: 1.0.2 Vue version: 3.2.13 Browser: Chromium110

Steps to reproduce When using the verify overlay component, the overlay is closed because popup is created outside the overlay element.

Reproduction Link or Source Code https://codesandbox.io/s/vuetify3-forked-7pixvp?file=/src/components/HelloWorld.vue image

Expected behavior The datepicker pop-up closes when you select a date from the pop-up.

Actual behavior When you select a date from the datepicker pop-up, both the overlay and the datepicker are closed because the date picker pop-up is recognized as a click element outside the overlay.

mengxiong10 commented 1 year ago

set append-to-body to false.

<date-picker :append-to-body="false" v-model:value="time"></date-picker>