From aea6cdece5b63a33a8d4c431d94be473c6db4e29 Mon Sep 17 00:00:00 2001 From: Tatu Lund Date: Fri, 25 Sep 2020 17:25:12 +0300 Subject: Add DateField(LocalDate value) constructor (#12096) --- server/src/main/java/com/vaadin/ui/DateField.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/src/main/java/com/vaadin/ui/DateField.java b/server/src/main/java/com/vaadin/ui/DateField.java index a79cbd8400..c8fdf0ee16 100644 --- a/server/src/main/java/com/vaadin/ui/DateField.java +++ b/server/src/main/java/com/vaadin/ui/DateField.java @@ -49,6 +49,17 @@ public class DateField extends AbstractLocalDateField { super(caption, value); } + /** + * Constructs a new DateField with initial date value. + * + * @param value + * the LocalDate value. + */ + public DateField(LocalDate value) { + super(); + setValue(value); + } + /** * Constructs an empty DateField with caption. * -- cgit v1.2.3