mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
FIX DefaultToToday date format
Fixes incorrectly using the minute (m) instead of the month (M) and switches to showing an 2018-09-21 format value
This commit is contained in:
parent
6176cf63b8
commit
2b4451cdac
@ -55,7 +55,7 @@ class EditableDateField extends EditableFormField
|
|||||||
public function getFormField()
|
public function getFormField()
|
||||||
{
|
{
|
||||||
$defaultValue = $this->DefaultToToday
|
$defaultValue = $this->DefaultToToday
|
||||||
? DBDatetime::now()->Format('Y-m-d')
|
? DBDatetime::now()->Format('yyyy-MM-dd')
|
||||||
: $this->Default;
|
: $this->Default;
|
||||||
|
|
||||||
$field = FormField::create($this->Name, $this->Title ?: false, $defaultValue)
|
$field = FormField::create($this->Name, $this->Title ?: false, $defaultValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user