The wrong date appears when the year format is four digits but the value is two digits
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
- 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.
Did this article resolve your issue ?