mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixes issue #2669
Add local setName() function to DatetimeField, which also sets Name on the constituent DateField, TimeField and timezoneField.
This commit is contained in:
parent
802b64db20
commit
b906442a9c
@ -77,6 +77,17 @@ class DatetimeField extends FormField {
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setName($name) {
|
||||
parent::setName($name);
|
||||
|
||||
$this->dateField->setName($name . '[date]');
|
||||
$this->timeField->setName($name . '[time]');
|
||||
$this->timezoneField->setName($name . '[timezone]');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function FieldHolder($properties = array()) {
|
||||
$config = array(
|
||||
|
Loading…
Reference in New Issue
Block a user