diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2026-02-20 15:26:41 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2026-02-20 15:26:41 +0000 |
| commit | 0a8a7f3d81a0c5d410e40d47d0a800153badba6d (patch) | |
| tree | d433b1312df9fd3bd795d557e58eb520eccd368f | |
| parent | e5be38221fa9ddf453224417b2a7d9fe24fad633 (diff) | |
StudipCalendar.vue: update the defaultDate URL parameter when the visible calendar range changes, fixes #6282
Closes #6282
Merge request studip/studip!4752
| -rw-r--r-- | resources/vue/apps/StudipCalendar.vue | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
