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
Describe the bug
On Ubuntu, it's possible to input more than 2 digits when trying to input a time. The behavior is different than the one in Windows, where the time gets automatically edited to the next meaningfull integer based on last input.
To Reproduce
Create a time picker by writing DateTime time = new DateTime(timeComposite, SWT.TIME | SWT.SHORT | SWT.BORDER | SWT.CENTER);
Interact with it by typing numbers that would result in non-valid hours or minutes, which are shown nevertheless.
Expected behavior
Scenario: 3:00 AM is set.
Try and edit the hours by typing 31. The hours should change to a 1, since 31 would not be valid.
If 1 is pressed again, the hours should change to 11.
If 1 is pressed again, the hours should change to 1, again.
Screenshots
Environment:
Select the platforms on which the behavior is seen.
[] All OS
[ ] Windows
[x] Linux
[ ] macOS (can't verify)
Additional OS info (e.g. OS version, Linux Desktop, etc)
Ubuntu 20.04 running in a VM.
JRE/JDK version
Temurin jdk-17.0.2+8.
Version since
Always been a problem AFAIK.
Workaround (or) Additional context
There are no possible workarounds, since the text that's displayed while in editor mode is inside an incapsulated variable of DateTime.java.
A possible solution may be to make the method "onNumberKeyInput" aware of what's been edited and hence set constraints.
The text was updated successfully, but these errors were encountered:
Describe the bug
On Ubuntu, it's possible to input more than 2 digits when trying to input a time. The behavior is different than the one in Windows, where the time gets automatically edited to the next meaningfull integer based on last input.
To Reproduce
DateTime time = new DateTime(timeComposite, SWT.TIME | SWT.SHORT | SWT.BORDER | SWT.CENTER);
Expected behavior
Scenario: 3:00 AM is set.
Try and edit the hours by typing 31. The hours should change to a 1, since 31 would not be valid.
If 1 is pressed again, the hours should change to 11.
If 1 is pressed again, the hours should change to 1, again.
Screenshots
Environment:
Select the platforms on which the behavior is seen.
[] All OS
[ ] Windows
[x] Linux
[ ] macOS (can't verify)
Additional OS info (e.g. OS version, Linux Desktop, etc)
Ubuntu 20.04 running in a VM.
JRE/JDK version
Temurin jdk-17.0.2+8.
Version since
Always been a problem AFAIK.
Workaround (or) Additional context
There are no possible workarounds, since the text that's displayed while in editor mode is inside an incapsulated variable of DateTime.java.
A possible solution may be to make the method "onNumberKeyInput" aware of what's been edited and hence set constraints.
The text was updated successfully, but these errors were encountered: