Reviewers: rchandia, Message: committed as r9060
Description: Fixing a bug in DatePickerCell where selecting a new date does not update the cell. Please review this at http://gwt-code-reviews.appspot.com/996801/show Affected files: M user/src/com/google/gwt/cell/client/DatePickerCell.java Index: user/src/com/google/gwt/cell/client/DatePickerCell.java =================================================================== --- user/src/com/google/gwt/cell/client/DatePickerCell.java (revision 9050) +++ user/src/com/google/gwt/cell/client/DatePickerCell.java (working copy) @@ -137,10 +137,16 @@ // Hide the panel and call valueUpdater.update when a date is selected datePicker.addValueChangeHandler(new ValueChangeHandler<Date>() { public void onValueChange(ValueChangeEvent<Date> event) { + // Remember the values before hiding the popup. + Element cellParent = lastParent; + Date oldValue = lastValue; + Object key = lastKey; panel.hide(); + + // Update the cell and value updater. Date date = event.getValue(); - setViewData(lastKey, date); - setValue(lastParent, lastValue, lastKey); + setViewData(key, date); + setValue(cellParent, oldValue, key); if (valueUpdater != null) { valueUpdater.update(date); } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
