code: private static void toggleDateOneButtonClicked() {
          datePicker1.togglePopup();
          String message = "The datePicker1 calendar popup is ";
          message += (datePicker1.isPopupOpen()) ? "open!" : "closed!";
          panel.messageTextArea.setText(message);
      }
docs: toggleDateOneButtonClicked, This toggles (opens or closes) date picker one.