You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PopupDateFieldPopup.java 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.vaadin.tests.components.datefield;
  2. import java.util.Calendar;
  3. import java.util.Locale;
  4. import com.vaadin.tests.components.TestBase;
  5. import com.vaadin.ui.DateField;
  6. import com.vaadin.ui.PopupDateField;
  7. public class PopupDateFieldPopup extends TestBase {
  8. @Override
  9. protected void setup() {
  10. // Set a specific time for the PopupDateField
  11. Calendar cal = Calendar.getInstance();
  12. cal.set(Calendar.YEAR, 2000);
  13. cal.set(Calendar.DAY_OF_YEAR, 1);
  14. cal.set(Calendar.HOUR_OF_DAY, 1);
  15. cal.set(Calendar.MINUTE, 1);
  16. cal.set(Calendar.SECOND, 1);
  17. cal.set(Calendar.MILLISECOND, 1);
  18. PopupDateField pdf = new PopupDateField();
  19. pdf.setLocale(Locale.US);
  20. pdf.setValue(cal.getTime());
  21. pdf.setImmediate(true);
  22. pdf.setResolution(DateField.RESOLUTION_SEC);
  23. addComponent(pdf);
  24. }
  25. @Override
  26. protected String getDescription() {
  27. return "Changing the minute, second and millisecond parts should also result in an update of the PopupDateField popup contents.";
  28. }
  29. @Override
  30. protected Integer getTicketNumber() {
  31. return 8391;
  32. }
  33. }