From f10374d6fd757704a93c767daaa2840ac8aea46c Mon Sep 17 00:00:00 2001 From: Walther Lalk Date: Sat, 30 Sep 2017 14:03:46 +0200 Subject: [PATCH] Only set the format if it isn't already set --- src/View/Widget/DateTimeWidget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') {