diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-09-07 16:20:05 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-09-07 16:20:05 +0000 |
commit | 54ce2e4a8fe74beff946d5f264265172bdde4aa0 (patch) | |
tree | c543676bb2d8d6d7a9eacb469eaf2219e6f29559 /src/com | |
parent | 17cfe8e30635b9685c083b65b98c54f759e91a4a (diff) | |
download | vaadin-framework-54ce2e4a8fe74beff946d5f264265172bdde4aa0.tar.gz vaadin-framework-54ce2e4a8fe74beff946d5f264265172bdde4aa0.zip |
Fix for #5369 - DateField doesn't show selected value after invalid
svn changeset:14766/svn branch:6.4
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java index 023934569a..ba91df0888 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java @@ -74,7 +74,12 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field, calendar.setSubmitListener(new SubmitListener() {
public void onSubmit() {
+ // Update internal value and send valuechange event if immediate
updateValue(calendar.getDate());
+
+ // Update text field (a must when not immediate).
+ buildDate(true);
+
closeCalendarPanel();
}
@@ -379,6 +384,13 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field, }
}
+ /**
+ * Update the text field contents from the date. See {@link #buildDate()}.
+ *
+ * @param forceValid
+ * true to force the text field to be updated, false to only
+ * update if the parsable flag is true.
+ */
protected void buildDate(boolean forceValid) {
if (forceValid) {
parsable = true;
|