code: public void setSelectedDate(LocalDate selectedDate) {
          setSelectedDateWithoutShowing(selectedDate);
          YearMonth yearMonthToShow
              = (selectedDate == null) ? YearMonth.now() : YearMonth.from(selectedDate);
          setDisplayedYearMonth(yearMonthToShow);
      }
docs: setSelectedDate, This sets a date that will be marked as "selected" in the calendar, and sets
  the displayed YearMonth to show that date. If the supplied date is null, then the selected
  date will be cleared, and the displayed YearMonth will be set to today's year and month.
  
  Technical note: This is implemented with the following two functions:
  setSelectedDateWithoutShowing() and setSelectedYearMonth().