code: public boolean setVetoPolicy(DateVetoPolicy vetoPolicy) {
          if (!hasParent()) {
              throw new RuntimeException("DatePickerSettings.setVetoPolicy(), "
                  + "A veto policy can only be set after constructing the parent DatePicker or "
                  + "the parent independent CalendarPanel. (The parent component should be "
                  + "constructed using the DatePickerSettings instance where the veto policy "
                  + "will be applied. The previous sentence is probably simpler than it sounds.)");
          }
          this.vetoPolicy = vetoPolicy;
          // If the parent is an independent calendar panel, redraw the panel to show the new policy.
          zDrawIndependentCalendarPanelIfNeeded();
          // Return true if the selected date is allowed by the new policy, otherwise return false.
          LocalDate parentDate = zGetParentSelectedDate();
          return isDateAllowed(parentDate);
      }
docs: setVetoPolicy,
  
  This sets a veto policy for the parent DatePicker or parent independent CalendarPanel.
  
  Important Note: The DatePicker or independent CalendarPanel associated with this settings
  instance is known as the "parent component". This function can only be called after the
  parent component is constructed with this settings instance. If this is called before the
  parent is constructed, then an exception will be thrown.
  
  When a veto policy is supplied, it will be used to determine which dates can or can not be
  selected in the calendar panel. (Vetoed dates are also not accepted into the date picker text
  field). See the demo class for an example of constructing a veto policy.
  
  By default, there is no veto policy. Setting this function to null will clear any veto policy
  that has been set.
  
  Return value: It's possible to set a veto policy that vetoes the currently selected date.
  This function returns true if the selected date is allowed by the new veto policy and the
  other current settings, or false if the selected date is vetoed or disallowed. Setting a new
  veto policy does not modify the selected date. Is up to the programmer to resolve any
  potential conflict between a new veto policy, and the currently selected date.