From a103c458cb8a05f0fe0d9e1d1c5fa62ea8d68ce2 Mon Sep 17 00:00:00 2001 From: Anne-Cath Date: Tue, 18 Mar 2025 16:58:50 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B08272=20-=20Portal=20:=20Unable=20to=20sa?= =?UTF-8?q?ve=20a=20date=20in=20French=20format=20-=20rollback=20removed?= =?UTF-8?q?=20code=20for=20N=C2=B07145?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/attributedef.class.inc.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 8b2915e1a..3f05f9863 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -6346,7 +6346,15 @@ class AttributeDateTime extends AttributeDBField $oFormField = parent::MakeFormField($oObject, $oFormField); - return $oFormField; + // After call to the parent as it sets the current value + $oValue = $oObject->Get($this->GetCode()); + if ($oValue === $this->GetNullValue()) { + $oValue = $this->GetDefaultValue($oObject); + } + $oFormField->SetCurrentValue($this->GetFormat()->Format($oValue)); + + + return $oFormField; } /**