diff --git a/src/Controls/DateTime/AbstractDateTimeInput.php b/src/Controls/DateTime/AbstractDateTimeInput.php index b8e22ab..104f69e 100644 --- a/src/Controls/DateTime/AbstractDateTimeInput.php +++ b/src/Controls/DateTime/AbstractDateTimeInput.php @@ -218,6 +218,10 @@ public function getRawValue() */ protected function getValueAsDateTimeImmutable() { + if ($this->value === null || $this->value === '') { + return null; + } + $date = $this->parser->parse($this->value); if ($date === null) { $this->addError($this->invalidValueMessage);