The wrong date appears when the year format is four digits but the value is two digits

Issue

  • After clicking the publish button, the incorrect year appears.
    Steps to reproduce:
    1. Navigate to Control Panel > Content & Data > Dynamic Data Lists
    2. Add a New list
    3. Select a Data Definitions
    4. Create a new Data Definition
    5. Drop a Date field to the right side of the panel
    6. Save the Data Definition
    7. Select the newly created Data Definition
    8. Save the new Data list
    8. Select the newly created Data list
    9. Click on Add button
    Checkpoint: The date mask is: mm/dd/yyyy
    10. Type today's date in the date field like 05/25/22 (where a year is a two-digit number)
    Observed Behavior: The date 05/25/22 becomes 05/25/1922.
    Expected Behavior: It should be 05/25/2022

Environment

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

Resolution

  • The observed behavior is a known DXP bug that has been addressed by LPS-149012 and is also resolved in DXP-Update-18 for DXP 7.4 versions.
  • If the hotfix is required for this issue, please create a support ticket requesting the hotfix by attaching the patch details.
  • Installing Fix Packs and Hotfixes on Liferay DXP will guide to install this hotfix in the respective environment.
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0