Do not use instanceof on value of Date and DateTime of Dict field

Instead we must use the attributes isDate and isDateTime.

Closes #13845
(grafted from c5b215bb328104a51f8d26d1f3e9e50f588d6568)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2025-03-10 11:06:00 +01:00
parent be3de61310
commit 0cb50865bd
+1 -2
View File
@@ -5382,8 +5382,7 @@ function eval_pyson(value){
return this._parse(this.format, this.input.val());
},
set_value: function(value) {
if ((value instanceof Sao.DateTime) ||
(value instanceof Sao.Date)) {
if (value && (value.isDate || value.isDateTime)) {
value = this._format(this.format, value);
} else {
value = '';