RFR: 8295339: DatePicker updates its value property with wrong date when dialog closes

Andy Goryachev angorya at openjdk.org
Thu Dec 8 18:06:43 UTC 2022


On Mon, 28 Nov 2022 12:42:15 GMT, Karthik P K <kpk at openjdk.org> wrote:

> Cause: On hiding the DatePicker dropdown, value selected was not getting updated to the text editor. Hence old value from the text editor was getting committed to DatePicker on focus loss. This issue was seen only when DatePicker is used in Alert dialog and Alert dialog is closed on making selection in DatePicker dropdown.
> 
> Fix: Added call to updateDisplayNode() function before hiding the date picker dropdown.
> 
> Test: Added system test to validate the fix.

Marked as reviewed by angorya (Committer).

tests/system/src/test/java/test/robot/javafx/scene/DatePickerUpdateOnAlertCloseTest.java line 61:

> 59:  * 4. Verify that selected date is updated in the date picker.
> 60:  */
> 61: 

minor: unnecessary newline.

otherwise, very solid code.  thank you Karthik!

-------------

PR: https://git.openjdk.org/jfx/pull/963


More information about the openjfx-dev mailing list