Fixes issue 3365 by making sure the date value is copied upon the construction of the date value change event.
review by:jlabanca

git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4901 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/datepicker/client/DateChangeEvent.java b/user/src/com/google/gwt/user/datepicker/client/DateChangeEvent.java
index 75586ef..7c21779 100644
--- a/user/src/com/google/gwt/user/datepicker/client/DateChangeEvent.java
+++ b/user/src/com/google/gwt/user/datepicker/client/DateChangeEvent.java
@@ -51,9 +51,11 @@
    * @param value the value

    */

   protected DateChangeEvent(Date value) {

-    super(value);

+    // The date must be copied in case one handler causes it to change.

+    super(CalendarUtil.copyDate(value));

   }

 

+  @Override

   public Date getValue() {

     return CalendarUtil.copyDate(super.getValue());

   }