XDatePicker
extends the regular DatePicker
class and enables you to add leading/trailing
nodes inside the DatePicker
. Leading and trailing controls are placed within a styleable container
- see XDatePicker CSS Reference. In editable mode the clearable button on the right side allows you to remove any
text input at once.
The screenshot was taken from XDatePickerDemo - the Demo can be downloaded from the link below.
XDatePicker picker = new XDatePicker();
picker.setPromptText("Select Date");
//picker.setClearButtonPosition(HPos.LEFT);
picker.addTrailingNode(createInnerButton("Find"));
picker.setPrefWidth(250);
centerPane.getChildren().add(picker);