code: @Override
      public void setEnabled(boolean enabled) {
          if (enabled == false) {
              closePopup();
          }
          setTextFieldToValidStateIfNeeded();
          super.setEnabled(enabled);
          toggleCalendarButton.setEnabled(enabled);
          dateTextField.setEnabled(enabled);
          zDrawTextFieldIndicators();
      }
docs: setEnabled, This enables or disables the date picker. When the date picker is enabled, dates
  can be selected by the user using any methods that are allowed by the current settings. When
  the date picker is disabled, there is no way for the user to interact with the component.
  More specifically, dates cannot be selected with the mouse, or with the keyboard, and the
  date picker components change their color scheme to indicate the disabled state. Any
  currently stored text and last valid date values are retained while the component is
  disabled.