public boolean isTextValid(String text){
  if (text == null || settings == null) {
    return false;
  }
  text=text.trim();
  if (text.isEmpty()) {
    return settings.getAllowEmptyDates();
  }
  LocalDate parsedDate=InternalUtilities.getParsedDateOrNull(text,settings.getFormatForDatesCommonEra(),settings.getFormatForDatesBeforeCommonEra(),settings.getFormatsForParsing(),settings.getLocale());
  if (parsedDate == null) {
    return false;
  }
  DateVetoPolicy vetoPolicy=settings.getVetoPolicy();
  if (InternalUtilities.isDateVetoed(vetoPolicy,parsedDate)) {
    return false;
  }
  return true;
}

public boolean isTextValid ( String text ) { if ( text == null || settings == null ) { return false ; } text = text . trim ( ) ; if ( text . isEmpty ( ) ) { return settings . getAllowEmptyDates ( ) ; } LocalDate parsedDate = InternalUtilities . getParsedDateOrNull ( text , settings . getFormatForDatesCommonEra ( ) , settings . getFormatForDatesBeforeCommonEra ( ) , settings . getFormatsForParsing ( ) , settings . getLocale ( ) ) ; if ( parsedDate == null ) { return false ; } DateVetoPolicy vetoPolicy = settings . getVetoPolicy ( ) ; if ( InternalUtilities . isDateVetoed ( vetoPolicy , parsedDate ) ) { return false ; } return true ; }
istextvalid , this function can be used to see if the supplied text represents a " valid date " according to the settings of this date picker . more specifically , this returns true if : 1 ) the text contains a parsable date that exists , and that has not been vetoed by a current veto policy , or 2 ) ( allowemptydates = = true ) and text . trim ( ) contains an empty string . otherwise returns false .
