Merge pull request #815 from indygriffiths/patch-1

Fix EdtiableDateField DefaultToToday using minute instead of month
This commit is contained in:
Robbie Averill 2018-09-22 13:54:13 +02:00 committed by GitHub
commit 3c8e403ac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ class EditableDateField extends EditableFormField
public function getFormField()
{
$defaultValue = $this->DefaultToToday
? DBDatetime::now()->Format('Y-m-d')
? DBDatetime::now()->Format('yyyy-MM-dd')
: $this->Default;
$field = FormField::create($this->Name, $this->Title ?: false, $defaultValue)