N°7145 - UI - Init Value DateTime and Date with Day Time

This commit is contained in:
Eric Espie
2025-01-07 10:18:23 +01:00
parent 301a7a92a0
commit 6948c594c2

View File

@@ -6438,7 +6438,7 @@ class AttributeDateTime extends AttributeDBField
public function GetDefaultValue(DBObject $oHostObject = null)
{
$sDefaultValue = $this->Get('default_value');
if (!$this->IsNullAllowed() && $sDefaultValue !== '') {
if (!$this->IsNullAllowed() && utils::IsNotNullOrEmptyString($sDefaultValue)) {
try {
$oDate = new DateTimeImmutable($sDefaultValue);
}