diff --git a/forms/DatetimeField.php b/forms/DatetimeField.php index cff9fdbdb..4192ed938 100644 --- a/forms/DatetimeField.php +++ b/forms/DatetimeField.php @@ -109,13 +109,7 @@ class DatetimeField extends FormField { */ public function Field($properties = array()) { Requirements::css(FRAMEWORK_DIR . '/css/DatetimeField.css'); - - $tzField = ($this->getConfig('usertimezone')) ? $this->timezoneField->FieldHolder() : ''; - return DBField::create_field('HTMLText', $this->dateField->FieldHolder() . - $this->timeField->FieldHolder() . - $tzField . - '
' - ); + return parent::Field($properties); } /** diff --git a/templates/forms/DatetimeField.ss b/templates/forms/DatetimeField.ss new file mode 100644 index 000000000..113c3875e --- /dev/null +++ b/templates/forms/DatetimeField.ss @@ -0,0 +1,6 @@ +$DateField.FieldHolder +$TimeField.FieldHolder +<% if $getConfig('usertimezone') %> + $TimezoneField.FieldHolder +<% end_if %> +