public interface DateRangeLimiter
extends android.os.Parcelable
| Modifier and Type | Method and Description |
|---|---|
java.util.Calendar |
getEndDate()
getEndDate returns the maximum selectable date of the picker
It is called in various places, including the hot loop when rendering.
|
default int |
getMaxYear()
getMaxYear returns the maximum selectable year of the picker
This method should semantically match getEndDate()
It is recommended to keep the default implementation.
|
default int |
getMinYear()
getMinYear returns the minimum selectable year of the picker.
|
java.util.Calendar |
getStartDate()
getStartDate returns the minimum selectable date of the picker
It is called in various places, including the hot loop when rendering.
|
boolean |
isOutOfRange(int year,
int month,
int day)
isOutOfRange is called for each date when it is about to be rendered
Returning true from this function will cause that particular day to be non selectable
Since this code is called in the inner loop when rendering, it is highly recommended to
keep the logic as simple as possible
|
java.util.Calendar |
setToNearestDate(java.util.Calendar day)
setToNearestDate rounds a Date to the nearest selectable value.
|
default int getMinYear()
default int getMaxYear()
java.util.Calendar getStartDate()
java.util.Calendar getEndDate()
boolean isOutOfRange(int year,
int month,
int day)
year - the year of the datemonth - the month of the dateday - the day of the month of the datejava.util.Calendar setToNearestDate(java.util.Calendar day)
day - a date with the current user selection