Legacy Knowledge Base
Published Jul. 2, 2025

I cannot select birthday year in date picker using Liferay Forms

Written By

Tímea Bihari

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • I have a form with a date field
  • The date field should be used to select birthdays
  • The year-selector goes back only 5 years prior to the current year

Environment

  • Liferay DXP 7.1
  • Liferay DXP 7.2
  • Liferay DXP 7.3
  • Liferay DXP 7.4

Resolution

  • Due to a combination of style and usability aspects, the date picker was implemented like this on purpose. This is hard coded into the product.
  • Our developers restricted the date range to +-5 years.
  • The expected result can be achieved with the following workarounds:

    1. Type the birth date instead of select it through the Date Picker.
    2. Navigate through the years, hitting the range limits. When the user clicks on the minor year, then the range of years is re-calculated and the minor year becomes the minor year minus 5. Also, the same behavior happens to the max year. For example, consider a range of years, like [2015,...,2020,...,2025], if the user clicks on 2025, then the new range will be [2020,...,2025,...,2030], allowing the user to select years not available on the initial range of years.

Additional Information

  • A feature request ticket is available under LPS-113259, so that the Product Team considers whether the Date Picker field could better cover the birthday use case in the future.
  • You might vote or comment on the Feature Request to give it more visibility.
Did this article resolve your issue ?

Legacy Knowledge Base