CalendarConstraints

public final class CalendarConstraints
extends Object implements Parcelable

java.lang.Object
   ↳ com.google.android.material.datepicker.CalendarConstraints


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.

Summary

Nested classes

class CalendarConstraints.Builder

Builder for CalendarConstraints

interface CalendarConstraints.DateValidator

Used to determine whether calendar days are enabled. 

Inherited constants

int CONTENTS_FILE_DESCRIPTOR

int PARCELABLE_WRITE_RETURN_VALUE

Fields

public static final Creator<CalendarConstraints> CREATOR

Parcelable.Creator

Public methods

int describeContents()
boolean equals(Object o)
CalendarConstraints.DateValidator getDateValidator()

Returns the CalendarConstraints.DateValidator that determines whether a date can be clicked and selected.

long getEndMs()

Returns the latest time in milliseconds allowed by this set of bounds.

Long getOpenAtMs()

Returns the openAt time in milliseconds within this set of bounds.

long getStartMs()

Returns the earliest time in milliseconds allowed by this set of bounds.

int hashCode()
void writeToParcel(Parcel dest, int flags)

Inherited methods

Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()
abstract int describeContents()
abstract void writeToParcel(Parcel arg0, int arg1)

Fields

CREATOR

public static final Creator<CalendarConstraints> CREATOR

Parcelable.Creator

Public methods

describeContents

public int describeContents ()

Returns
int

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getDateValidator

public CalendarConstraints.DateValidator getDateValidator ()

Returns the CalendarConstraints.DateValidator that determines whether a date can be clicked and selected.

getEndMs

public long getEndMs ()

Returns the latest time in milliseconds allowed by this set of bounds.

Returns
long

getOpenAtMs

public Long getOpenAtMs ()

Returns the openAt time in milliseconds within this set of bounds. Returns null if not available.

Returns
Long

getStartMs

public long getStartMs ()

Returns the earliest time in milliseconds allowed by this set of bounds.

Returns
long

hashCode

public int hashCode ()

Returns
int

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int