Stay organized with collections
Save and categorize content based on your preferences.
CalendarConstraints.DateValidator
public
static
interface
CalendarConstraints.DateValidator
implements
Parcelable
com.google.android.material.datepicker.CalendarConstraints.DateValidator
|
Known indirect subclasses
|
Used to determine whether calendar days are enabled.
Extends Parcelable
in order to maintain the DateValidator
across device
configuration changes. Parcelable breaks when passed between processes.
Summary
Inherited constants |
From interface
android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR
|
int |
PARCELABLE_WRITE_RETURN_VALUE
|
|
Public methods |
abstract
boolean
|
isValid(long date)
Returns true if the provided date is enabled.
|
Inherited methods |
From interface
android.os.Parcelable
abstract
int
|
describeContents()
|
abstract
void
|
writeToParcel(Parcel arg0, int arg1)
|
|
Public methods
isValid
public abstract boolean isValid (long date)
Returns true if the provided date
is enabled.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# CalendarConstraints.DateValidator\n\nSummary: [Inherited Constants](#inhconstants) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nCalendarConstraints.DateValidator\n=================================\n\n\n`\npublic\nstatic\n\n\ninterface\nCalendarConstraints.DateValidator\n`\n\n\n`\n\n\nimplements\n\nParcelable\n\n\n`\n\n|--------------------------------------------------------------------------|\n| com.google.android.material.datepicker.CalendarConstraints.DateValidator |\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [CompositeDateValidator](/reference/com/google/android/material/datepicker/CompositeDateValidator), [DateValidatorPointBackward](/reference/com/google/android/material/datepicker/DateValidatorPointBackward), [DateValidatorPointForward](/reference/com/google/android/material/datepicker/DateValidatorPointForward) |------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [CompositeDateValidator](/reference/com/google/android/material/datepicker/CompositeDateValidator) | A [CalendarConstraints.DateValidator](/reference/com/google/android/material/datepicker/CalendarConstraints.DateValidator) that accepts a list of Date Validators. | | [DateValidatorPointBackward](/reference/com/google/android/material/datepicker/DateValidatorPointBackward) | A [CalendarConstraints.DateValidator](/reference/com/google/android/material/datepicker/CalendarConstraints.DateValidator) that enables only dates before a given point. | | [DateValidatorPointForward](/reference/com/google/android/material/datepicker/DateValidatorPointForward) | A [CalendarConstraints.DateValidator](/reference/com/google/android/material/datepicker/CalendarConstraints.DateValidator) that enables dates from a given point forward. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nUsed to determine whether calendar days are enabled.\n\nExtends [Parcelable](/reference/android/os/Parcelable) in order to maintain the `DateValidator` across device\nconfiguration changes. Parcelable breaks when passed between processes.\n\nSummary\n-------\n\n| ### Inherited constants |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| From interface `android.os.Parcelable` |-------|---------------------------------| | `int` | `CONTENTS_FILE_DESCRIPTOR` | | `int` | `PARCELABLE_WRITE_RETURN_VALUE` | |\n\n| ### Public methods ||\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[isValid](/reference/com/google/android/material/datepicker/CalendarConstraints.DateValidator#isValid(long))`(long date) ` Returns true if the provided `date` is enabled. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` android.os.Parcelable ` |------------------|------------------------------------------| | ` abstract int` | ` describeContents() ` | | ` abstract void` | ` writeToParcel(Parcel arg0, int arg1) ` | ||\n\nPublic methods\n--------------\n\n### isValid\n\n```\npublic abstract boolean isValid (long date)\n```\n\nReturns true if the provided `date` is enabled.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|---------------|\n| `date` | `long` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |"]]