Skip to main content

JXDatePicker "wrong" ESCAPE handling?

No replies
astumpfl
Offline
Joined: 2013-05-17
Points: 0

hi there,

i just found out that JXDatePicker swallows ESCAPE keys by ignoring it's JFormattedTextField's state.
this behaviour is generally undesirable when you'd like to bind the ESCAPE key to e.g. a dialog when it's not in editing mode;
just like JFormattedTextField it should only consume it when it's in editing mode.

a simple patch would solve this issue. just add

@Override
public boolean isEnabled() {
return cancelAction.isEnabled();
}

to org.jdesktop.swingx.plaf.basic.BasicDatePickerUI.EditorCancelAction.

how could i contribute that code snippet to the code base?

best regards, alex