fix(LvPlan route): changes the route on change:range instead of change:offset because the focusdate is updates in change:range

This commit is contained in:
SimonGschnell
2025-06-23 11:54:42 +02:00
parent 30e4459f67
commit 4d61cdeb91
2 changed files with 7 additions and 8 deletions
+6 -4
View File
@@ -202,7 +202,7 @@ export default {
},
},
methods: {
handleChangeOffset(offset){
handleRangeOffset(event){
let date = new Date(
this.focusDate.y,
@@ -222,7 +222,9 @@ export default {
focus_date: date,
lv_id: this.$route.params.lv_id || null
}
})
});
this.$emit('change:range',event);
},
setMode(mode) {
this.mode = mode
@@ -274,8 +276,8 @@ export default {
},
template: /*html*/`
<div ref="container" class="fhc-calendar card h-100" :class="sizeClass">
<component :is="'calendar-' + mode" @updateMode="mode = $event" @change:range="$emit('change:range',$event)"
@input="handleInput" @change:offset="handleChangeOffset">
<component :is="'calendar-' + mode" @updateMode="mode = $event" @change:range="handleRangeOffset"
@input="handleInput" >
<template #calendarDownloads>
<slot name="calendarDownloads" ></slot>
</template>
+1 -4
View File
@@ -221,10 +221,7 @@ const LvPlan = {
// reset the events before querying the new events to activate the loading spinner
this.events = null;
this.eventCalendarDate = new CalendarDate(end);
Vue.nextTick(() => {
this.loadEvents();
});
this.loadEvents();
}
},
calendarDateToString: function (calendarDate) {