MINOR Using Object::create() for sub fields in DatetimeField to allow changing the dependencies globally

This commit is contained in:
Ingo Schommer 2011-10-06 11:18:29 +02:00
parent d6c050c6ce
commit a3bcf0c61c

View File

@ -57,8 +57,8 @@ class DatetimeField extends FormField {
function __construct($name, $title = null, $value = ""){
$this->config = self::$default_config;
$this->dateField = new DateField($name . '[date]', false);
$this->timeField = new TimeField($name . '[time]', false);
$this->dateField = Object::create('DateField', $name . '[date]', false);
$this->timeField = Object::create('TimeField', $name . '[time]', false);
$this->timezoneField = new HiddenField($this->Name() . '[timezone]');
parent::__construct($name, $title, $value);