public boolean setDateRangeLimits ( LocalDate firstAllowedDate , LocalDate lastAllowedDate ) { if ( ! hasParent ( ) ) { throw new RuntimeException ( "DatePickerSettings.setDateRangeLimits(), " + "A date range limit 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 " + "date range limits will be applied. The previous sentence is probably " + "simpler than it sounds.)" ) ; } if ( firstAllowedDate == null && lastAllowedDate == null ) { return setVetoPolicy ( null ) ; } return setVetoPolicy ( new DateVetoPolicyMinimumMaximumDate ( firstAllowedDate , lastAllowedDate ) ) ; }
setDateRangeLimits This is a convenience function for setting a DateVetoPolicy that will limit the allowed dates in the parent object to a specified minimum and maximum date value . Calling this function will always replace any existing DateVetoPolicy .