From 08b684478aeb1af1f4a53621a757b1ca6facd827 Mon Sep 17 00:00:00 2001 From: lucs7 Date: Sun, 6 Jul 2025 12:39:23 -0700 Subject: [PATCH] fix: correct datepicker issue introduced in e0cfcbc fix missing Datepicker tpl and logic for datepicker in schedule page issue was introduced in e0cfcbc --- Controls/DatePickerSetupControl.php | 6 ++- tpl/Controls/DatePickerSetup.tpl | 60 +++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 tpl/Controls/DatePickerSetup.tpl diff --git a/Controls/DatePickerSetupControl.php b/Controls/DatePickerSetupControl.php index d788990cb..a5a22b9ee 100644 --- a/Controls/DatePickerSetupControl.php +++ b/Controls/DatePickerSetupControl.php @@ -43,7 +43,11 @@ public function PageLoad() $this->SetDefault('MinDate', null); $this->SetDefault('MaxDate', null); - $this->Display('Controls/DateSetup.tpl'); + if ($controlId == 'datepicker') { + $this->Display('Controls/DatePickerSetup.tpl'); + } else { + $this->Display('Controls/DateSetup.tpl'); + } } private function SetDefault($key, $value) diff --git a/tpl/Controls/DatePickerSetup.tpl b/tpl/Controls/DatePickerSetup.tpl new file mode 100644 index 000000000..faefcaadf --- /dev/null +++ b/tpl/Controls/DatePickerSetup.tpl @@ -0,0 +1,60 @@ +{function name=datePickerDateFormat} +new Date({$date->Year()}, {$date->Month()-1}, {$date->Day()}) +{/function} +