diff --git a/src/View/Widget/DateTimeWidget.php b/src/View/Widget/DateTimeWidget.php index c2fcca3b..26ab7c72 100644 --- a/src/View/Widget/DateTimeWidget.php +++ b/src/View/Widget/DateTimeWidget.php @@ -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') {