Skip to content

Commit

Permalink
oprava ukladani DateTimeImmutable
Browse files Browse the repository at this point in the history
  • Loading branch information
attreid committed Aug 10, 2017
1 parent 80acc0c commit 10071a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Traits/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ public function getValue()
return parent::getValue();
}
}

public function setValue($value)
{
return parent::setValue($value instanceof DateTimeImmutable ? $value->format($this->htmlFormat) : $value);
}
}

0 comments on commit 10071a8

Please sign in to comment.