Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker: allow input of partial dates #6749

Open
gunnarschmid opened this issue Oct 28, 2024 · 2 comments
Open

DatePicker: allow input of partial dates #6749

gunnarschmid opened this issue Oct 28, 2024 · 2 comments
Labels
enhancement New feature or request waiting for author Further information is requested

Comments

@gunnarschmid
Copy link

Describe your motivation

In Vaadin 8 you could use the DateField (by setting DateFormat and Resolution) to allow entering partial dates, e. g. dd.mm. or mm.yyyy. This is not possible with Flow's DatePicker.

Describe the solution you'd like

Please either extend DatePicker or add DateField component to allow partial dates.

Describe alternatives you've considered

As an alternative one can use a CustomField with some Selects, but this requires some manual work for data binding, updating one Select by the value of another (different number of days depending on month and leap year) etc.
A standard component would be highly appreciated.

@gunnarschmid gunnarschmid added the enhancement New feature or request label Oct 28, 2024
@mcollovati mcollovati transferred this issue from vaadin/flow Oct 28, 2024
@sissbruecker
Copy link
Contributor

In principle that should be doable using custom date formats. For example:

        DatePicker datePicker1 = new DatePicker();
        datePicker1.setI18n(new DatePicker.DatePickerI18n().setDateFormat("dd.MM."));

        DatePicker datePicker2 = new DatePicker();
        datePicker2.setI18n(new DatePicker.DatePickerI18n().setDateFormat("MM.yyyy"));
Bildschirmaufnahme.2024-10-28.um.15.43.57.mov

Is there anything in specific that doesn't work?

@sissbruecker sissbruecker added the waiting for author Further information is requested label Oct 28, 2024
@gunnarschmid
Copy link
Author

Hello Sascha,
thanks a lot for your reply.
I'm pretty sure that I tested that before and had some issue, but right now I can neither remember nor reproduce what the problem was. I'll test again and report here soon.

DiegoCardoso added a commit that referenced this issue Nov 27, 2024
Add `setAriaLabel`/`getAriaLabel` methods to `Grid` that uses the
`accessibleName` property available in the web component to set the
`aria-label` attribute on its internal `<table>` element.

Fixes #6749
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting for author Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants