-
-
Notifications
You must be signed in to change notification settings - Fork 172
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using multiDates and selecting at least 3 dates, if one of the selected dates is deselected, the hour and minute values become NaN. Afterwards, trying to select another date triggers the following console error:
RangeError: Invalid time value
To Reproduce
- Create a Vue component with the following code:
<template>
<VueDatePicker v-model="date" multiDates />
</template>
<script setup>
import { VueDatePicker } from "@vuepic/vue-datepicker";
import { ref } from "vue";
const date = ref();
</script>- Select 3 or more different dates.
- Deselect one of the previously selected dates.
- Observe that the hours and minutes are
NaN. - Try selecting another date and check the browser console.
Expected behavior
When a date is deselected, the remaining dates should keep valid hour and minute values, and selecting new dates should not produce errors.
Desktop & mobile (please complete the following information):
- Browser: Brave
- Library version: 12.0.4
Additional context
This bug occurs only when there are at least 3 selected dates. Selecting or deselecting 1 or 2 dates does not trigger the issue.
joannar-streetwave
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
