Android 12 Developer Preview is here! Try it out, and give us your feedback!

DateValidatorPointForward

public class DateValidatorPointForward
extends Object implements CalendarConstraints.DateValidator

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


A CalendarConstraints.DateValidator that enables dates from a given point forward. Defaults to the current moment in device time forward using now(), but can be set to any point, as UTC milliseconds, using from(long).

Summary

Inherited constants

Fields

public static final Creator<DateValidatorPointForward> CREATOR

Part of Parcelable requirements.

Public methods

int describeContents()
boolean equals(Object o)
static DateValidatorPointForward from(long point)

Returns a CalendarConstraints.DateValidator which enables days from point, in UTC milliseconds, forward.

int hashCode()
boolean isValid(long date)

Returns true if the provided date is enabled.

static DateValidatorPointForward now()

Returns a CalendarConstraints.DateValidator enabled from the current moment in device time forward.

void writeToParcel(Parcel dest, int flags)

Inherited methods

Fields

CREATOR

public static final Creator<DateValidatorPointForward> CREATOR

Part of Parcelable requirements. Do not use.

Public methods

describeContents

public int describeContents ()

Returns
int

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

from

public static DateValidatorPointForward from (long point)

Returns a CalendarConstraints.DateValidator which enables days from point, in UTC milliseconds, forward.

Parameters
point long

Returns
DateValidatorPointForward

hashCode

public int hashCode ()

Returns
int

isValid

public boolean isValid (long date)

Returns true if the provided date is enabled.

Parameters
date long

Returns
boolean

now

public static DateValidatorPointForward now ()

Returns a CalendarConstraints.DateValidator enabled from the current moment in device time forward.

Returns
DateValidatorPointForward

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int