private void configureListeners() {
        /*
           * Changes to be done in text box on change of seletedDate ,
           * selectedMonth and selectedYear in DatePicker.
           */
        ChangeListener<Object> listener = new ChangeListener<Object>() {
            @Override
            public void changed(ObservableValue<? extends Object> arg0, Object arg1, Object arg2) {
                showDateInTextField();
            }
        };

        selectedDateProperty().addListener(listener);
        selectedMonthProperty().addListener(listener);
        selectedYearProperty().addListener(listener);
        showDateInTextField();

        properties.localeProperty().addListener(new ChangeListener<Locale>() {
            @Override
            public void changed(ObservableValue<? extends Locale> arg0, Locale arg1, Locale arg2) {
                pickerPopup.refreshDisplayText();
            }
        });

        /* Adding listeners for styles. */
        getStyleClass().addListener(new ListChangeListener<String>() {
            @Override
            public void onChanged(javafx.collections.ListChangeListener.Change<? extends String> paramChange) {
                dateTxtField.getStyleClass().clear();
                dateTxtField.getStyleClass().addAll("text-input", "text-field");
                for (String clazz : getStyleClass()) {
                    if (!clazz.equals(DEFAULT_STYLE_CLASS)) {
                        dateTxtField.getStyleClass().add(clazz);
                    }
                }
            }
        });
    }