Vuepic / vue-datepicker

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

Bug on multi date + min / max + month-picker #744

Closed jowebdev closed 8 months ago

jowebdev commented 8 months ago

Describe the bug This configuration, doesn't work, no errors but I can't valid.

To Reproduce


<template>
    <VueDatePicker v-model="date" :min-date="minDate" :max-date="maxDate" :enableTimePicker="false" multi-dates month-picker  />
</template>

<script setup>
import { ref } from 'vue';
import { addMonths, getMonth, getYear, subMonths } from 'date-fns';

const date = ref([]);
// 2 months before and after the current date
const minDate = computed(() => subMonths(new Date(getYear(new Date()), getMonth(new Date())), 7));
const maxDate = computed(() => subMonths(new Date(getYear(new Date()), getMonth(new Date())), 4));
</script>