Describe the bug
When trying to update the week number or month number by changing the date with the v-modeled value, which works properly on singleSelectPicker the month and week pickers won't show the right month/week.
To Reproduce
Use VueDatePicker with week-picker or month-picker mode,
Create a button that will calculate the referenced value on the date-picker by it's current value + 7 days and set the ref to the correct 7 days after date.
something like:
// calendarDate - v-model value that i used on the date picker.
const calendarDate = ref(new Date(Date.now()));
function handlePrevMonth() {
const prevDate: Date = new Date(calendarDate.value);
prevDate.setMonth(calendarDate.value.getMonth() - 1);
calendarDate.value = prevDate;
}
Expected behavior
Expect the date picker to reflect the next week. it won't happen
Screenshots
Desktop & mobile (please complete the following information):
Describe the bug When trying to update the week number or month number by changing the date with the v-modeled value, which works properly on singleSelectPicker the month and week pickers won't show the right month/week.
To Reproduce Use VueDatePicker with week-picker or month-picker mode, Create a button that will calculate the referenced value on the date-picker by it's current value + 7 days and set the ref to the correct 7 days after date.
something like: // calendarDate - v-model value that i used on the date picker. const calendarDate = ref(new Date(Date.now()));
function handlePrevMonth() { const prevDate: Date = new Date(calendarDate.value); prevDate.setMonth(calendarDate.value.getMonth() - 1); calendarDate.value = prevDate; }
Expected behavior Expect the date picker to reflect the next week. it won't happen
Screenshots![image](https://github.com/Vuepic/vue-datepicker/assets/87308049/6ca02d43-eb93-40aa-bfe0-916ff4133d0d)
Desktop & mobile (please complete the following information):