aboutsummaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-09-07 16:20:05 +0000
committerArtur Signell <artur.signell@itmill.com>2010-09-07 16:20:05 +0000
commit54ce2e4a8fe74beff946d5f264265172bdde4aa0 (patch)
treec543676bb2d8d6d7a9eacb469eaf2219e6f29559 /src/com
parent17cfe8e30635b9685c083b65b98c54f759e91a4a (diff)
downloadvaadin-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.java12
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;