Skip to content

Commit

Permalink
Merge pull request #815 from indygriffiths/patch-1
Browse files Browse the repository at this point in the history
Fix EdtiableDateField DefaultToToday using minute instead of month
  • Loading branch information
robbieaverill authored Sep 22, 2018
2 parents 6176cf6 + 2b4451c commit 3c8e403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/Model/EditableFormField/EditableDateField.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function getCMSFields()
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)
Expand Down

0 comments on commit 3c8e403

Please sign in to comment.