From 6361d403563e994544c951e94f5da1722afdf37c Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Tue, 7 Jan 2025 15:26:08 +0100 Subject: [PATCH] update(WeekCalendarHeader):uses the last day of the week instead of the first day of the week for the calendar title --- application/helpers/hlp_header_helper.php | 5 ++++- public/js/components/Calendar/Week.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/helpers/hlp_header_helper.php b/application/helpers/hlp_header_helper.php index ea1795ad5..c1d10f979 100644 --- a/application/helpers/hlp_header_helper.php +++ b/application/helpers/hlp_header_helper.php @@ -89,6 +89,8 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod) { $user_language = getUserLanguage(); + // default locale + //user_locale: "'.Locale::DEFAULT_LOCALE.'", $toPrint = "\n"; $toPrint .= ''; diff --git a/public/js/components/Calendar/Week.js b/public/js/components/Calendar/Week.js index 36d012b27..b7dbb3f44 100644 --- a/public/js/components/Calendar/Week.js +++ b/public/js/components/Calendar/Week.js @@ -12,7 +12,7 @@ export default { }, computed: { title() { - return this.focusDate.format({ year: 'numeric' }) + ' KW ' + this.focusDate.w; + return this.focusDate.cdLastDayOfWeek.format({ year: 'numeric' }) + ' KW ' + this.focusDate.cdLastDayOfWeek.w; } }, methods: {