Jfoenix: JFXTimePicker's getEditor().clear() is not clearing the TextField when called.

Created on 18 Apr 2017  路  3Comments  路  Source: sshahine/JFoenix

While trying to clear the TextField of the JFXTimePicker I noticed that doing timePicker.getEditor().clear() didn't do anything.
I do:
@FXML
private JFXTimePicker timePicker;

and inside a method I call the method:

private void clearField()
{
timePicker.getEditor().clear();
}

Bug

Most helpful comment

Hello,
you can now clear the editor text by using one of the following:
jfxTimePicker.setValue(null); or jfxTimePicker.getEditor().clear();
please note that you need to use the latest jfoenix jar as we fixed some issues in pickers.

Regards,

All 3 comments

Looking through the files of JFXTimePicker, I don't think getEditor() is implemented correctly. Neither do I know why it's there at all.
However, to set the value of the TextField one can simply use jfxTimePicker.setValue(new LocalTimeStringConverter().fromString("")).

Hello,
_getEditor()_ method will be updated later to fix this issue. Meanwhile, (as @Iw1s mentioned) you can simply call jfxTimePicker.setValue(new LocalTimeStringConverter().fromString("")) to clear the value.

Regards

Hello,
you can now clear the editor text by using one of the following:
jfxTimePicker.setValue(null); or jfxTimePicker.getEditor().clear();
please note that you need to use the latest jfoenix jar as we fixed some issues in pickers.

Regards,

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RodrigoSantiago picture RodrigoSantiago  路  3Comments

salwyn picture salwyn  路  3Comments

orochies picture orochies  路  5Comments

deme78 picture deme78  路  3Comments

ayushchadha23 picture ayushchadha23  路  5Comments