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

Instead we must use the attributes isDate and isDateTime.

Closes #13845
This commit is contained in:
Cédric Krier
2025-03-10 11:06:00 +01:00
parent 8544521766
commit 0059cd28cd
+1 -2
View File
@@ -5775,8 +5775,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 = '';