public void propertyChange(PropertyChangeEvent evt) {
            // Short circuit if the following cases are found
            if (evt.getOldValue() == null && evt.getNewValue() == null) {
                return;
            }
            if (evt.getOldValue() != null && evt.getOldValue().equals(evt.getNewValue())) {
                return;
            }
            if (!formattedTextField.isEditable()) {
                return;
            }

            // If the field is editable and we need to parse the date entered
            if (evt.getNewValue() != null) {
                Calendar value = (Calendar) evt.getNewValue();
                DateModel model = new UtilCalendarModel(value);
                // check constraints
                if (!datePanel.checkConstraints(model)) {
                    // rollback
                    formattedTextField.setValue(evt.getOldValue());
                    return;
                }
                datePanel.getModel().setDate(value.get(Calendar.YEAR), value.get(Calendar.MONTH), value.get(Calendar.DATE));
                datePanel.getModel().setSelected(true);
            }

            // Clearing textfield will also fire change event
            if (evt.getNewValue() == null) {
                // Set model value unselected, this will fire an event
                getModel().setSelected(false);
            }
        }