diff options
-rw-r--r-- | tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java b/tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java index 736fdc87a6..aca1c84ca3 100644 --- a/tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java +++ b/tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java @@ -1,6 +1,7 @@ package com.vaadin.tests.components.datefield;
-import java.sql.Date;
+import java.text.DateFormat;
+import java.util.Date;
import java.util.Locale;
import com.vaadin.data.Property.ValueChangeEvent;
@@ -22,6 +23,9 @@ public class DateFieldEmptyValid extends TestBase { private MyDateField df;
+ private DateFormat formatter = DateFormat.getDateTimeInstance(
+ DateFormat.LONG, DateFormat.LONG, new Locale("en", "US"));
+
public class MyDateField extends PopupDateField {
@Override
public boolean isEmpty() {
@@ -115,7 +119,13 @@ public class DateFieldEmptyValid extends TestBase { }
private void checkEmpty() {
- log.log("DateField value is now " + df.getValue());
+ Object value = df.getValue();
+ if (value instanceof Date) {
+ value = formatter.format(df.getValue());
+ }
+
+ log.log("DateField value is now " + value);
+ // log.log("DateField value is now " + df.getValue());
log.log("isEmpty: " + df.isEmpty() + ", isValid: " + df.isValid());
}
|