You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you type a number greater than 23 into hours or 59 into minutes the corresponding LocalTime element will be set to its maximum value but the value in the field will remain as entered. For example, if you enter 123 into the hour field the hour element of the LocalTime value will be set to 23 but the hour field will still show 123.
Additionally, if you enter a value greater than Integer.MAX_INT both the hour and minute LocalTime values are set to 0 (but the large value remains in the field).
Code Example:
final TimeField timeField = new TimeField();
timeField.valueProperty().addListener((observable, oldValue, newValue) -> {
System.out.println("TimeField value changed");
System.out.println("Hour: " + newValue.getHour());
System.out.println("Minute: " + newValue.getMinute());
});
Output:
// Initial TimeField value 12:30
// Change hour to 123
TimeField value changed
Hour: 23
Minute: 30
// Hold 9 key until hour value is 123999999999999999
TimeField value changed
Hour: 0
Minute: 0
The text was updated successfully, but these errors were encountered:
If you type a number greater than 23 into hours or 59 into minutes the corresponding LocalTime element will be set to its maximum value but the value in the field will remain as entered. For example, if you enter 123 into the hour field the hour element of the LocalTime value will be set to 23 but the hour field will still show 123.
Additionally, if you enter a value greater than Integer.MAX_INT both the hour and minute LocalTime values are set to 0 (but the large value remains in the field).
Code Example:
Output:
The text was updated successfully, but these errors were encountered: