mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
Merge pull request #815 from indygriffiths/patch-1
Fix EdtiableDateField DefaultToToday using minute instead of month
This commit is contained in:
commit
3c8e403ac2
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user