DatePickerDefaults

@Stable
object DatePickerDefaults

Contains default values used by the DatePicker.

Properties

Link copied to clipboard

A default SelectableDates that allows all dates to be selected.

Link copied to clipboard
@get:Composable
val shape: Shape

The default shape for date picker dialogs.

Link copied to clipboard

The default tonal elevation used for DatePickerDialog.

Link copied to clipboard

A date format skeleton used to format a selected date (e.g. "Mar 27, 2021")

Link copied to clipboard

A date format skeleton used to format the date picker's year selection menu button (e.g. "March 2021")

Link copied to clipboard

A date format skeleton used to format a selected date to be used as content description for screen readers (e.g. "Saturday, March 27, 2021")

Link copied to clipboard

The range of years for the date picker dialogs.

Functions

Link copied to clipboard
@Composable
fun colors(): DatePickerColors
@Composable
fun colors(containerColor: Color = Color.Unspecified, titleContentColor: Color = Color.Unspecified, headlineContentColor: Color = Color.Unspecified, weekdayContentColor: Color = Color.Unspecified, subheadContentColor: Color = Color.Unspecified, navigationContentColor: Color = Color.Unspecified, yearContentColor: Color = Color.Unspecified, disabledYearContentColor: Color = Color.Unspecified, currentYearContentColor: Color = Color.Unspecified, selectedYearContentColor: Color = Color.Unspecified, disabledSelectedYearContentColor: Color = Color.Unspecified, selectedYearContainerColor: Color = Color.Unspecified, disabledSelectedYearContainerColor: Color = Color.Unspecified, dayContentColor: Color = Color.Unspecified, disabledDayContentColor: Color = Color.Unspecified, selectedDayContentColor: Color = Color.Unspecified, disabledSelectedDayContentColor: Color = Color.Unspecified, selectedDayContainerColor: Color = Color.Unspecified, disabledSelectedDayContainerColor: Color = Color.Unspecified, todayContentColor: Color = Color.Unspecified, todayDateBorderColor: Color = Color.Unspecified, dayInSelectionRangeContentColor: Color = Color.Unspecified, dayInSelectionRangeContainerColor: Color = Color.Unspecified, dividerColor: Color = Color.Unspecified, dateTextFieldColors: TextFieldColors? = null): DatePickerColors

Creates a DatePickerColors that will potentially animate between the provided colors according to the Material specification.

Link copied to clipboard
fun dateFormatter(yearSelectionSkeleton: String = YearMonthSkeleton, selectedDateSkeleton: String = YearAbbrMonthDaySkeleton, selectedDateDescriptionSkeleton: String = YearMonthWeekdayDaySkeleton): DatePickerFormatter
Link copied to clipboard
@Composable
fun DatePickerHeadline(selectedDateMillis: Long?, displayMode: DisplayMode, dateFormatter: DatePickerFormatter, modifier: Modifier = Modifier)

A default date picker headline composable that displays a default headline text when there is no date selection, and an actual date string when there is.

Link copied to clipboard
@Composable
fun DatePickerTitle(displayMode: DisplayMode, modifier: Modifier = Modifier)

A default date picker title composable.