Is it possible to use two DatePickers in inline mode in one component in Vaadin 14?

Viewed 89

Is there a way to create two DatePickers in Vaadin 14 in one component? I mean something like this:

but without the time. This is a component created in Vaadin 8 with two InlineDateFields but in Vaadin 14 there is no InlineDateFields(is there any replacement for this field from Vaadin 8?).

Thanks in advance :)

1 Answers

Currently, there is no replacement for the InlineDateField component in Vaadin 14 or later.

The closest is the <vaadin-month-calendar> web component (source), which is an internal part of the new DatePicker component. You might be able to hack something together with that, if you first create a Java component on top of it. Note, that it hasn't been designed/implemented to be used standalone, so it might not work very nicely.

In the directory on the other hand exists Date Range Picker add-on for picking date range.

Related