code: private static void clearOneAndTwoButtonClicked(ActionEvent e) {
          // Clear the date pickers.
          datePicker1.clear();
          datePicker2.clear();
          // Display message.
          String message = "The datePicker1 and datePicker2 dates were cleared!\n\n";
          message += getDatePickerOneDateText() + "\n";
          String date2String = datePicker2.getDateStringOrSuppliedString("(null)");
          message += ("The datePicker2 date is currently set to: " + date2String + ".");
          panel.messageTextArea.setText(message);
      }
docs: clearOneAndTwoButtonClicked, This clears date picker one.