code: protected void updateCloseBehavior() {
  
          if (isEnabled()) {
              if (!m_isValidTime && isValidTime()) {
                  m_isValidTime = true;
                  m_popup.setAutoHideEnabled(true);
              } else if (m_isValidTime && !isValidTime()) {
                  m_isValidTime = false;
                  m_popup.setAutoHideEnabled(false);
              }
  
              if (!m_isValidDateBox && isValideDateBox()) {
                  m_isValidDateBox = true;
                  if (m_autoHideParent != null) {
                      m_autoHideParent.removeAutoHidePartner(RootPanel.getBodyElement().getParentElement());
                  }
              } else if (m_isValidDateBox && !isValideDateBox()) {
                  m_isValidDateBox = false;
                  if (m_autoHideParent != null) {
                      m_autoHideParent.addAutoHidePartner(RootPanel.getBodyElement().getParentElement());
                  }
              }
          }
      }
docs: Updates the auto hide partner from the parent widget.<p>
  
  If there is any invalid user input the parent widget should not be closed automatically.<p>