Skip to content

Commit

Permalink
Merge pull request #217 from FriendsOfCake/dakota-patch-1
Browse files Browse the repository at this point in the history
Only set the format if it isn't already set
  • Loading branch information
ADmad authored Sep 30, 2017
2 parents a02c9a9 + f10374d commit 3bc55fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/View/Widget/DateTimeWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function render(array $data, ContextInterface $context)
$val = $val->format($type === 'date' ? 'Y-m-d' : 'Y-m-d H:i:s');
}

if ($format !== null) {
if ($format === null) {
if ($type === 'date') {
$format = 'L';
} elseif ($type === 'time') {
Expand Down

0 comments on commit 3bc55fc

Please sign in to comment.