CalendarConstraints

class CalendarConstraints : Parcelable

Used to limit the display range of the calendar and set an openAt month.

Implements Parcelable in order to maintain the CalendarConstraints across device configuration changes. Parcelable breaks when passed between processes. Copied from Material Library Required for updated date picker EnterpriseDatePicker to work

Constructors

CalendarConstraints
Link copied to clipboard
fun CalendarConstraints(parcel: Parcel)

Types

Builder
Link copied to clipboard
class Builder
Builder for com.cvs.design.datepicker.
CREATOR
Link copied to clipboard
object CREATOR : Parcelable.Creator<CalendarConstraints>
DateValidator
Link copied to clipboard
interface DateValidator : Parcelable
Used to determine whether calendar days are enabled.

Properties

dateValidator
Link copied to clipboard
val dateValidator: CalendarConstraints.DateValidator?
Returns the DateValidator that determines whether a date can be clicked and selected.
end
Link copied to clipboard
val end: Month?
Returns the latest month allowed by this set of bounds.
monthSpan
Link copied to clipboard
val monthSpan: Int
Returns the total number of java.util.Calendar.MONTH included in start to end.
openAt
Link copied to clipboard
var openAt: Month?
Sets the openAt month.
start
Link copied to clipboard
val start: Month?
Returns the earliest month allowed by this set of bounds.
yearSpan
Link copied to clipboard
val yearSpan: Int
Returns the total number of java.util.Calendar.YEAR included in start to end.

Functions

clamp
Link copied to clipboard
fun clamp(month: Month): Month?
Returns the given month if it's within the constraints or the closest bound if it's outside.
describeContents
Link copied to clipboard
open override fun describeContents(): Int
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
isWithinBounds
Link copied to clipboard
fun isWithinBounds(date: Long): Boolean
writeToParcel
Link copied to clipboard
open override fun writeToParcel(dest: Parcel, flags: Int)