vaadin / web-components

A set of high-quality standards based web components for enterprise web applications. Part of Vaadin 20+
https://vaadin.com/docs/latest/components
469 stars 83 forks source link

[date-picker] add support for inline date picker #7380

Open chvndb opened 6 months ago

chvndb commented 6 months ago

Describe your motivation

I am trying to create a form like popup that has some custom options for the user to select. One option is the need to select a date. I would like the date selection to be inline next to the other options. In Vaadin 8 there was an option to have inline date fields.

Describe the solution you'd like

Next to the current datepicker, I would like an inline datepicker that can be used directly next to other content instead of having its own popup.

Describe alternatives you've considered

There are no real alternatives, expect from trying other external components.

Additional context

No response

web-padawan commented 6 months ago

Please note that DatePicker has an option to disable auto-open which prevents the popup from opening on click and allows user to type a date.

chvndb commented 6 months ago

Indeed, but I still want the selection widget so the user can select the date instead of having to type it.

I do not want the datepicker popup as this component is already rendered in another popup and I want to avoid have a popup inside of a popup.

yuriy-fix commented 6 months ago

Dear @chvndb, would you like to have something like the example provided?

chvndb commented 6 months ago

@yuriy-fix Something like that. What I actually created with Vaadin 8 was a date range picker with 2 inline date fields, see screenshot:

Screenshot 2024-05-16 at 15 11 30

It combines custom logic to have have a dopdown using bootstrap and then adds Vaadin components to it. I am migrating to Vaadin 24, but this I cannot do anymore.