}
// add a close and accept button if we're showing time
if ( getSkinnable().getShowTime())
{
VBox lVBox = new VBox();
lBorderPane.rightProperty().set(lVBox);
ImageView lAcceptIconImageView = new ImageViewButton();
lAcceptIconImageView.getStyleClass().addAll("accept-icon");
lAcceptIconImageView.setPickOnBounds(true);
lAcceptIconImageView.setOnMouseClicked( (mouseEvent) -> {
getSkinnable().calendarProperty().set(calendarPicker.calendarProperty().get());
lPopup.hide();
});
lVBox.add(lAcceptIconImageView);
ImageView lCloseIconImageView = new ImageViewButton();
lCloseIconImageView.getStyleClass().addAll("close-icon");
lCloseIconImageView.setPickOnBounds(true);
lCloseIconImageView.setOnMouseClicked( (mouseEvent) -> {
lPopup.hide();
});
lVBox.add(lCloseIconImageView);
}
// if a value is selected in date mode, immediately close the popup
calendarPicker.calendarProperty().addListener( (observable) -> {
if (lPopup != null && getSkinnable().getShowTime() == false && lPopup.isShowing()) {