diff --git a/modules/web/src/com/haulmont/cuba/web/toolkit/ui/CubaDateFieldWrapper.java b/modules/web/src/com/haulmont/cuba/web/toolkit/ui/CubaDateFieldWrapper.java index 8d84caa0c9..392d1fb73f 100644 --- a/modules/web/src/com/haulmont/cuba/web/toolkit/ui/CubaDateFieldWrapper.java +++ b/modules/web/src/com/haulmont/cuba/web/toolkit/ui/CubaDateFieldWrapper.java @@ -89,10 +89,13 @@ public class CubaDateFieldWrapper extends CustomField { @Override public void setPropertyDataSource(Property newDataSource) { + Object newValue = newDataSource != null ? newDataSource.getValue() : null; + Object oldValue = getValue(); + super.setPropertyDataSource(newDataSource); // support dateField in editable table - if (newDataSource != null && !ObjectUtils.equals(newDataSource.getValue(), getValue())) - dateField.setValue(newDataSource.getValue()); + if (newDataSource != null && !ObjectUtils.equals(newValue, oldValue)) + dateField.setValue(newValue); } @Override @@ -107,4 +110,4 @@ public class CubaDateFieldWrapper extends CustomField { @Override public void removeAllValidators() { } -} +} \ No newline at end of file