code: public void setFormatForMenuTimes(String patternString) {
          DateTimeFormatter formatter
                  = PickerUtilities.createFormatterFromPatternString(patternString, locale);
          setFormatForMenuTimes(formatter);
      }
docs: setFormatForMenuTimes, This sets the format that is used to display or parse menu times in
  the time picker, using a pattern string. The default format is generated using the locale of
  the settings instance.
  
  Available pattern strings can be found in the Javadocs for the DateTimeFormatter class, at
  this URL: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
  
  If the time picker has already been constructed, then calling this function will cause
  immediate validation of the text field text.