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:
Indy Griffiths 2018-09-21 15:58:19 +12:00 committed by Robbie Averill
parent 6176cf63b8
commit 2b4451cdac
1 changed files with 1 additions and 1 deletions

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)