{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

SelectableDates

@ExperimentalMaterial3Api
public interface SelectableDates


An interface that controls the selectable dates and years in the date pickers UI.

Summary

Public methods

default boolean
isSelectableDate(long utcTimeMillis)

Returns true if the date item representing the utcTimeMillis should be enabled for selection in the UI.

default boolean
isSelectableYear(int year)

Returns true if a given year should be enabled for selection in the UI.

Public methods

isSelectableDate

default boolean isSelectableDate(long utcTimeMillis)

Returns true if the date item representing the utcTimeMillis should be enabled for selection in the UI.

isSelectableYear

default boolean isSelectableYear(int year)

Returns true if a given year should be enabled for selection in the UI. When a year is defined as non selectable, all the dates in that year will also be non selectable.