From 0a8a7f3d81a0c5d410e40d47d0a800153badba6d Mon Sep 17 00:00:00 2001 From: Moritz Strohm Date: Fri, 20 Feb 2026 15:26:41 +0000 Subject: StudipCalendar.vue: update the defaultDate URL parameter when the visible calendar range changes, fixes #6282 Closes #6282 Merge request studip/studip!4752 --- resources/vue/apps/StudipCalendar.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/vue/apps/StudipCalendar.vue b/resources/vue/apps/StudipCalendar.vue index c2689e5..ce415cc 100644 --- a/resources/vue/apps/StudipCalendar.vue +++ b/resources/vue/apps/StudipCalendar.vue @@ -408,6 +408,12 @@ export default defineComponent({ } }, handleCalendarRangeUpdate: function(arg: DatesSetArg) : void { + //Update the defaultDate URL parameter first: + const url = new URL(window.location.href); + url.searchParams.set('defaultDate', datetime.getISODate(arg.start)); + //Set the new defaultDate URL parameter without reloading the page: + window.history.replaceState(null, '', url.toString()); + if (this.displayHolidays || this.displayVacations) { //Make sure that all holidays and vacations are loaded for the range. //NOTE: This works only for views that span over a maximum of two years -- cgit v1.0