JDK-8269867 : DatePicker does not handle 2 digit year numbers correctly in UK Locale
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: jfx11,jfx16,jfx17
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2021-07-01
  • Updated: 2024-06-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
I am using the UK locale so short local date format is day/month/year (e.g. 4/7/21 is 4th of July.)

A DESCRIPTION OF THE PROBLEM :
If you type a date into the text field of DatePicker using a 2 digit year value - e.g. 1/1/21 - the date is set as being in the first century CE.  I.e 1/1/21 comes out as 1st of January AD21 NOT AD2021 as would be expected.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a trivial application with a DatePicker; use normal logging to show the value of the date entered in the text field.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Date should resolve to the 21st century
ACTUAL -
Date resolves to the first century CE

FREQUENCY : always



Comments
Checked with attached testcase with UK region setting in Window 10, Issue is reproducible < attached screen shot for reference> Test Result: ========= 8u291: Pass openjfx11: Fail openjfx16:Fail openjfx17ea: Fail
05-07-2021