diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VCalendarPanel.java | 13 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/client/src/com/vaadin/client/ui/VCalendarPanel.java b/client/src/com/vaadin/client/ui/VCalendarPanel.java index 58e0448b5f..96678fd133 100644 --- a/client/src/com/vaadin/client/ui/VCalendarPanel.java +++ b/client/src/com/vaadin/client/ui/VCalendarPanel.java @@ -56,6 +56,7 @@ import com.vaadin.client.DateTimeService; import com.vaadin.client.Util; import com.vaadin.client.VConsole; import com.vaadin.shared.ui.datefield.Resolution; +import com.vaadin.shared.util.SharedUtil; @SuppressWarnings("deprecation") public class VCalendarPanel extends FocusableFlexTable implements @@ -2214,9 +2215,9 @@ public class VCalendarPanel extends FocusableFlexTable implements * @param startDate * - the allowed range's start date */ - public void setRangeStart(Date rangeStart) { - if (this.rangeStart != rangeStart) { - this.rangeStart = rangeStart; + public void setRangeStart(Date newRangeStart) { + if (!SharedUtil.equals(rangeStart, newRangeStart)) { + rangeStart = newRangeStart; if (initialRenderDone) { // Dynamic updates to the range needs to render the calendar to // update the element stylenames @@ -2233,9 +2234,9 @@ public class VCalendarPanel extends FocusableFlexTable implements * @param endDate * - the allowed range's end date */ - public void setRangeEnd(Date rangeEnd) { - if (this.rangeEnd != rangeEnd) { - this.rangeEnd = rangeEnd; + public void setRangeEnd(Date newRangeEnd) { + if (!SharedUtil.equals(rangeEnd, newRangeEnd)) { + rangeEnd = newRangeEnd; if (initialRenderDone) { // Dynamic updates to the range needs to render the calendar to // update the element stylenames diff --git a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java index f018caefa5..a82bfd1391 100644 --- a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java @@ -178,8 +178,8 @@ public class PopupDateFieldConnector extends TextualDateConnector { public void onStateChanged(StateChangeEvent stateChangeEvent) { super.onStateChanged(stateChangeEvent); getWidget().setTextFieldEnabled(getState().textFieldEnabled); - getWidget().setRangeStart(getState().rangeStart); - getWidget().setRangeEnd(getState().rangeEnd); + getWidget().setRangeStart((Date) getState().rangeStart.clone()); + getWidget().setRangeEnd((Date) getState().rangeEnd.clone()); } @Override |