Class DateVetoPolicyMinimumMaximumDate
java.lang.Object
com.github.lgooddatepicker.zinternaltools.DateVetoPolicyMinimumMaximumDate
- All Implemented Interfaces:
DateVetoPolicy
DateVetoPolicyMinimumMaximumDate, This class implements a veto policy that can set a minimum and
a maximum value for the dates allowed in a DatePicker or a CalendarPanel.
Pass in the first and the last allowed date to the constructor. If one of the values is null,
then there will be no limiting date on the associated side of the date range. Only one of the two
limiting dates can be null. If both dates are supplied, then the lastAllowedDate must be greater
than or equal to the firstAllowedDate.
-
Constructor Summary
ConstructorsConstructorDescriptionDateVetoPolicyMinimumMaximumDate
(LocalDate firstAllowedDate, LocalDate lastAllowedDate) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetDateRangeLimits, This returns the currently used date limits, as a DateInterval object.boolean
isDateAllowed
(LocalDate date) isDateAllowed, This implements the DateVetoPolicy interface.void
setDateRangeLimits
(LocalDate firstAllowedDate, LocalDate lastAllowedDate) setDateRangeLimits, This sets the currently used date limits.
-
Constructor Details
-
DateVetoPolicyMinimumMaximumDate
Constructor. Pass in the first and the last allowed date. If one of the values is null, then there will be no limiting date on the associated side of the date range. Only one of the two limiting dates can be null. If both dates are supplied, then the lastAllowedDate must be greater than or equal to the firstAllowedDate.
-
-
Method Details
-
getDateRangeLimits
getDateRangeLimits, This returns the currently used date limits, as a DateInterval object. -
isDateAllowed
isDateAllowed, This implements the DateVetoPolicy interface. This returns true if the date is allowed, otherwise this returns false. The value of null will never be passed to this function, under any case.- Specified by:
isDateAllowed
in interfaceDateVetoPolicy
-
setDateRangeLimits
setDateRangeLimits, This sets the currently used date limits.
-