mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Using Object::create() for sub fields in DatetimeField to allow changing the dependencies globally
This commit is contained in:
parent
d6c050c6ce
commit
a3bcf0c61c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user