diff options
author | Teemu Pòˆntelin <teemu@vaadin.com> | 2014-05-05 23:58:00 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-05-14 07:24:41 +0000 |
commit | ac6a98648d54fc89cab5c5cecc2d9f1b9a3b01dc (patch) | |
tree | cda58ae8d2e388e30d3b30fba029c647443a004a /client | |
parent | 717d868b79896811e5a9489239f3eea42e1fed09 (diff) | |
download | vaadin-framework-ac6a98648d54fc89cab5c5cecc2d9f1b9a3b01dc.tar.gz vaadin-framework-ac6a98648d54fc89cab5c5cecc2d9f1b9a3b01dc.zip |
Fixed disabled and read-only modes of InlineDateField (#10262)
Change-Id: If95d50954a4122b1039174ffcacd7874f7f1f71e
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VCalendarPanel.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/com/vaadin/client/ui/VCalendarPanel.java b/client/src/com/vaadin/client/ui/VCalendarPanel.java index 5bdb3388e9..d8c96917d8 100644 --- a/client/src/com/vaadin/client/ui/VCalendarPanel.java +++ b/client/src/com/vaadin/client/ui/VCalendarPanel.java @@ -139,6 +139,10 @@ public class VCalendarPanel extends FocusableFlexTable implements */ @Override public void onClick(ClickEvent event) { + if (!isEnabled() || isReadonly()) { + return; + } + Date newDate = ((Day) event.getSource()).getDate(); if (!isDateInsideRange(newDate, Resolution.DAY)) { return; @@ -175,10 +179,6 @@ public class VCalendarPanel extends FocusableFlexTable implements private Date value; - private boolean enabled = true; - - private boolean readonly = false; - private DateTimeService dateTimeService; private boolean showISOWeekNumbers; @@ -350,11 +350,11 @@ public class VCalendarPanel extends FocusableFlexTable implements } private boolean isReadonly() { - return readonly; + return parent.isReadonly(); } private boolean isEnabled() { - return enabled; + return parent.isEnabled(); } @Override |