0

I am using JdateChooser to take input from the user. I wanted to disable editing options for the textfield that appears except for the backspace. I used the following code

JDateChooser chooser = new JDateChooser();
JTextFieldDateEditor editor = (JTextFieldDateEditor) chooser.getDateEditor();
editor.setEditable(false);

but this disables all the options including the backspace.

Hendrik
  • 5,085
  • 24
  • 56
  • 1
    If everything but the backspace is disabled, there is no way to enter anything anymore. – Hendrik Dec 13 '16 at 17:16
  • A JDateChooser component consists of a small button using which date can be selected and a small text field that displays the selected date. I'm talking about that text field. – Amrit Kumar Dec 15 '16 at 10:03

0 Answers0