diff --git a/src/Type/DatetimeType.php b/src/Type/DatetimeType.php index b361271..93c598d 100644 --- a/src/Type/DatetimeType.php +++ b/src/Type/DatetimeType.php @@ -38,6 +38,6 @@ private function isValidDatetime(string $value): bool $date = DateTime::createFromFormat($this->datetimeFormat, $value, new DateTimeZone($this->datetimeZone)); $errors = DateTime::getLastErrors(); - return $date && !$errors; + return $date && (!$errors || $errors['warning_count'] === 0 && $errors['error_count'] === 0); } }