]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add DateField(LocalDate value) constructor (#12096)
authorTatu Lund <tatu@vaadin.com>
Fri, 25 Sep 2020 14:25:12 +0000 (17:25 +0300)
committerGitHub <noreply@github.com>
Fri, 25 Sep 2020 14:25:12 +0000 (17:25 +0300)
server/src/main/java/com/vaadin/ui/DateField.java

index a79cbd84003208fe370ba19d0ef44be1dfc010ac..c8fdf0ee16573964ccd237b149f62b4daa1c70d0 100644 (file)
@@ -49,6 +49,17 @@ public class DateField extends AbstractLocalDateField {
         super(caption, value);
     }
 
+    /**
+     * Constructs a new <code>DateField</code> with initial date value.
+     *
+     * @param value
+     *            the LocalDate value.
+     */
+    public DateField(LocalDate value) {
+        super();
+        setValue(value);
+    }
+
     /**
      * Constructs an empty <code>DateField</code> with caption.
      *