Consistent schema keys

This commit is contained in:
Ingo Schommer 2017-04-27 11:47:04 +12:00
parent 14b3468eee
commit b852a76334
3 changed files with 15 additions and 3 deletions

View File

@ -295,7 +295,11 @@ class DateField extends TextField
$defaults = parent::getSchemaDataDefaults();
return array_merge($defaults, [
'lang' => i18n::convert_rfc1766($this->getLocale()),
'html5' => $this->getHTML5()
'data' => array_merge($defaults['data'], [
'html5' => $this->getHTML5(),
'min' => $this->getMinDate(),
'max' => $this->getMaxDate()
])
]);
}

View File

@ -111,7 +111,12 @@ class DatetimeField extends TextField
{
$defaults = parent::getSchemaDataDefaults();
return array_merge($defaults, [
'html5' => $this->getHTML5()
'lang' => i18n::convert_rfc1766($this->getLocale()),
'data' => array_merge($defaults['data'], [
'html5' => $this->getHTML5(),
'min' => $this->getMinDate(),
'max' => $this->getMaxDate()
])
]);
}

View File

@ -235,7 +235,10 @@ class TimeField extends TextField
{
$defaults = parent::getSchemaDataDefaults();
return array_merge($defaults, [
'html5' => $this->getHTML5()
'lang' => i18n::convert_rfc1766($this->getLocale()),
'data' => array_merge($defaults['data'], [
'html5' => $this->getHTML5(),
])
]);
}