code: public void propertyChange(PropertyChangeEvent evt) {
          if (evt.getPropertyName().equals("day")) {
              if (popup.isVisible() && jcalendar.getCalendar().get(Calendar.MONTH) == jcalendar.monthChooser.getMonth()) {
                  dateSelected = true;
                  popup.setVisible(false);
                  setDate(jcalendar.getCalendar().getTime());
              }
          } else if (evt.getPropertyName().equals("date")) {
              if (evt.getSource() == dateEditor) {
                  firePropertyChange("date", evt.getOldValue(), evt.getNewValue());
              } else {
                  setDate((Date) evt.getNewValue());
              }
          }
      }
docs: Listens for a "date" property change or a "day" property change event
  from the JCalendar. Updates the date editor and closes the popup.
  
  @param evt
  the event