DatePicker PopUp modification.

Hi everyone! I hope you are doing fine. For some business reason I need to show only the YEAR of the date picker in the date calendar that pops up. The rest of the PopUp (Days-Months calendar is not needed). Is there a way to achieve this?

I have used this line of code that sets the value of the field to year-only which is correct but when I click the field to choose a year it shows the whole calendar.

I have thought of using a simple combobox filled with year values as integers, but I am curious if it is possible to modify the existing DatePicker field for the desired result.

(I have attached an image of the desired behavior of vaadin 8)

Thank you in advance!

I wouldn’t even try. Use a ComboBox or a custom component.

Haha thank you for your advice. Have a nice day!