Skip to content

Commit

Permalink
Only set the format if it isn't already set
Browse files Browse the repository at this point in the history
  • Loading branch information
dakota authored Sep 30, 2017
1 parent a02c9a9 commit f10374d
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 f10374d

Please sign in to comment.