diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/datefield/CustomDateFormat.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/datefield/CustomDateFormat.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormat.java b/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormat.java new file mode 100644 index 0000000000..c2afb4cba3 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormat.java @@ -0,0 +1,42 @@ +package com.vaadin.tests.components.datefield; + +import java.util.Calendar; +import java.util.Locale; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.DateField; + +public class CustomDateFormat extends TestBase { + + @Override + protected void setup() { + + Locale locale = new Locale("fi", "FI"); + Calendar cal = Calendar.getInstance(); + cal.set(2010, 0, 1); + + DateField df = new DateField(); + df.setResolution(DateField.RESOLUTION_DAY); + df.setLocale(locale); + df.setWidth("300px"); + + String pattern = "d. MMMM'ta 'yyyy 'klo 'H.mm.ss"; + df.setDateFormat(pattern); + + df.setValue(cal.getTime()); + + addComponent(df); + + } + + @Override + protected String getDescription() { + return "Month name should be visible in text box if format pattern includes it"; + } + + @Override + protected Integer getTicketNumber() { + return 3490; + } + +} |