diff --git a/src/FormBuilder.php b/src/FormBuilder.php index 7c0dfe5..8fec997 100644 --- a/src/FormBuilder.php +++ b/src/FormBuilder.php @@ -431,7 +431,9 @@ public function number($name, $value = null, $options = []) */ public function date($name, $value = null, $options = []) { - if ($value instanceof DateTime) { + $value ??= $this->getValueAttribute($name, $value); + + if ($value instanceof DateTimeInterface) { $value = $value->format('Y-m-d'); }