From 14949a063f7abfd69ff39c06d217807844e2ba07 Mon Sep 17 00:00:00 2001 From: Moritz Strohm <strohm@data-quest.de> Date: Mon, 18 Mar 2024 11:48:39 +0000 Subject: [PATCH] fixed date format in the date selector for fullcalendar in the sidebar, fixes #3809 Closes #3809 Merge request studip/studip!2691 --- resources/assets/javascripts/lib/fullcalendar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/assets/javascripts/lib/fullcalendar.js b/resources/assets/javascripts/lib/fullcalendar.js index ec59de6342b..49274f47f45 100644 --- a/resources/assets/javascripts/lib/fullcalendar.js +++ b/resources/assets/javascripts/lib/fullcalendar.js @@ -754,7 +754,10 @@ class Fullcalendar // Update sidebar value let element = jQuery('#booking-plan-jmpdate,#date_select').first(); - element.val(changedMoment.toLocaleDateString('de-DE')); + let padded_date = pad(changedMoment.getDate(), 2, '0') + + '.' + pad(changedMoment.getMonth() + 1, 2, '0') + + '.' + changedMoment.getFullYear(); + element.val(padded_date); if (element.is('#booking-plan-jmpdate')) { //Store the date in the sessionStorage: sessionStorage.setItem('booking_plan_date', changed_date); -- GitLab