code: public void setFormatForDatesCommonEra(String patternString) {
          DateTimeFormatter formatter
              = PickerUtilities.createFormatterFromPatternString(patternString, getLocale());
          setFormatForDatesCommonEra(formatter);
      }
docs: setFormatForDatesCommonEra, This sets the format that is used to display or parse CE dates in
  the date picker, from a DateTimeFormatter pattern string. The default value for the date
  format is generated using the locale of the settings instance.
  
  The various codes for the date pattern string are described at this link:
  https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
  
  If the date picker has already been constructed, then calling this function will cause
  immediate validation of the text field text.
  
  Note: Changing the format for CE dates may also change the default minimum width of the date
  picker text field.