From 805f7fcd1e32e5dfa74abcb4f695a51c131a618c Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Mon, 28 Oct 2013 14:54:20 +0000 Subject: [PATCH] Editable false for required DateField #PL-2963 --- .../com/haulmont/cuba/web/gui/components/WebDateField.java | 2 ++ .../com/haulmont/cuba/web/toolkit/ui/DateFieldWrapper.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/modules/web6/src/com/haulmont/cuba/web/gui/components/WebDateField.java b/modules/web6/src/com/haulmont/cuba/web/gui/components/WebDateField.java index 981946f82a..ad338bd241 100644 --- a/modules/web6/src/com/haulmont/cuba/web/gui/components/WebDateField.java +++ b/modules/web6/src/com/haulmont/cuba/web/gui/components/WebDateField.java @@ -422,6 +422,8 @@ public class WebDateField this.editable = editable; timeField.setEditable(editable); dateField.setReadOnly(!editable); + + component.setCompositionReadonly(!editable); } @Override diff --git a/modules/web6/src/com/haulmont/cuba/web/toolkit/ui/DateFieldWrapper.java b/modules/web6/src/com/haulmont/cuba/web/toolkit/ui/DateFieldWrapper.java index 9af39a5059..ab8a8d7704 100644 --- a/modules/web6/src/com/haulmont/cuba/web/toolkit/ui/DateFieldWrapper.java +++ b/modules/web6/src/com/haulmont/cuba/web/toolkit/ui/DateFieldWrapper.java @@ -79,6 +79,10 @@ public class DateFieldWrapper extends CustomField { } } + public void setCompositionReadonly(boolean readonly) { + super.setReadOnly(readonly); + } + @Override public Object getValue() { return dateField.getValue();