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} +