mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Add 'lang' attribute to front-end date field schema
This commit is contained in:
parent
62309df04c
commit
81a21f68cd
@ -290,6 +290,12 @@ class DateField extends TextField
|
||||
return $attributes;
|
||||
}
|
||||
|
||||
public function getSchemaDataDefaults()
|
||||
{
|
||||
$defaults = parent::getSchemaDataDefaults();
|
||||
return array_merge($defaults, [ 'lang' => i18n::convert_rfc1766($this->getLocale()) ]);
|
||||
}
|
||||
|
||||
public function Type()
|
||||
{
|
||||
return 'date text';
|
||||
|
Loading…
x
Reference in New Issue
Block a user