Vuepic / vue-datepicker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
1.52k stars 152 forks source link

Automatic closing of month or year picker in inline mode #741

Closed timoteiNicsoft closed 9 months ago

timoteiNicsoft commented 9 months ago

Describe the solution you'd like I am using vue-datepicker with the inline and multiple calendar mode. It would be helpful if the month-picker or year-picker could automatically close when clicking outside of the selector.

Jasenkoo commented 9 months ago

It will be redundant adding it, you can achieve this by providing a custom prop

<template> 
    <VueDatePicker ref="dp" :conifg="{ onClickOutside }" >
</template>

<script setup>
  import { ref } from "vue";

  const dp = ref();

  const onClickOutside = () => {
     dp.value?.switchView('calendar', 0);
  }
</script>