From 2547d8c5b1e483f861f7666e3b8dd407346bcceb Mon Sep 17 00:00:00 2001 From: lucs7 Date: Wed, 9 Jul 2025 15:46:54 +0200 Subject: [PATCH 1/2] style: adjust CSS to support datepicker in theme --- Web/css/schedule.css | 49 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/Web/css/schedule.css b/Web/css/schedule.css index 63d2d8b0f..5dd53a0cc 100644 --- a/Web/css/schedule.css +++ b/Web/css/schedule.css @@ -544,4 +544,51 @@ a.toggle-sidebar { #reservationsToTop:hover { color: #000; -} \ No newline at end of file +} + +.ui-widget-header { + color: var(--text-color-btn) !important; + background: var(--primary) !important; +} + +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-button, html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active { + background: var(--text-color-btn) !important; + border: 1px solid var(--color-lines) !important; +} + +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { + background: var(--text-color-btn) !important; + border: 1px solid var(--primary) !important; +} + +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { + border: 1px solid var(--primary) !important; + background: var(--primary) !important; + color: var(--text-color-btn) !important; +} + +.ui-datepicker .ui-datepicker-buttonpane button { + color: var(--text-color-btn) !important; + background: var(--primary) !important; + opacity: 1; +} + +.ui-datepicker-header .ui-state-hover{ + background: none !important; + border: none !important; +} + +.ui-datepicker .ui-datepicker-next-hover { + top: 2px !important; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px !important; +} + +.ui-datepicker .ui-datepicker-prev-hover { + left: 2px !important; +} + +.ui-datepicker .ui-datepicker-next-hover { + right: 2px !important; +} From 1b7c41b7c65e7e64096337898a5130bfc99ff88b Mon Sep 17 00:00:00 2001 From: lucs7 Date: Wed, 9 Jul 2025 17:42:09 +0200 Subject: [PATCH 2/2] fix(schedule): datepicker string conversion issue Resolves a bug where clicking on a calendar date while logged out causes the following JavaScript error: Uncaught TypeError: (inst.selectedMonth + 1).padStart is not a function Ensure padStart() is called on a string, not a number, by explicitly converting the number: (inst.selectedMonth + 1).toString().padStart(2, '0') Closes: #671 --- Web/scripts/schedule.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/scripts/schedule.js b/Web/scripts/schedule.js index 2a4cf94d0..95ab3b54f 100644 --- a/Web/scripts/schedule.js +++ b/Web/scripts/schedule.js @@ -1199,7 +1199,7 @@ function ChangeGroup(node) { } function AddSpecificDate(dateText, inst) { - var formattedDate = inst.selectedYear + '-' + (inst.selectedMonth + 1).padStart(2, '0') + '-' + inst.selectedDay.padStart(2, '0'); + var formattedDate = inst.selectedYear + '-' + (inst.selectedMonth + 1).toString().padStart(2, '0') + '-' + inst.selectedDay.toString().padStart(2, '0'); if (scheduleSpecificDates.indexOf(formattedDate) != -1) { return; } @@ -1218,7 +1218,7 @@ function dpDateChanged(dateText, inst) { ChangeDate(inst.selectedYear, (inst.selectedMonth + 1).toString().padStart(2, '0') , inst.selectedDay.toString().padStart(2, '0')); } else { var date = new Date(); - ChangeDate(date.getFullYear(), (date.getMonth() + 1).padStart(2, '0'), date.getDate().padStart(2, '0')); + ChangeDate(date.getFullYear(), (date.getMonth() + 1).toString().padStart(2, '0'), date.getDate().toString().padStart(2, '0')); } } }