mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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;
|
return $attributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSchemaDataDefaults()
|
||||||
|
{
|
||||||
|
$defaults = parent::getSchemaDataDefaults();
|
||||||
|
return array_merge($defaults, [ 'lang' => i18n::convert_rfc1766($this->getLocale()) ]);
|
||||||
|
}
|
||||||
|
|
||||||
public function Type()
|
public function Type()
|
||||||
{
|
{
|
||||||
return 'date text';
|
return 'date text';
|
||||||
|
Loading…
Reference in New Issue
Block a user