androidx.compose.material3

DatePickerColors

Class

No hand-written docs yet.

Represents the colors used by the date picker.

class DatePickerColors(
    containerColor: Color,
    titleContentColor: Color,
    headlineContentColor: Color,
    weekdayContentColor: Color,
    subheadContentColor: Color,
    navigationContentColor: Color,
    yearContentColor: Color,
    disabledYearContentColor: Color,
    currentYearContentColor: Color,
    selectedYearContentColor: Color,
    disabledSelectedYearContentColor: Color,
    selectedYearContainerColor: Color,
    disabledSelectedYearContainerColor: Color,
    dayContentColor: Color,
    disabledDayContentColor: Color,
    selectedDayContentColor: Color,
    disabledSelectedDayContentColor: Color,
    selectedDayContainerColor: Color,
    disabledSelectedDayContainerColor: Color,
    todayContentColor: Color,
    todayDateBorderColor: Color,
    dayInSelectionRangeContainerColor: Color,
    dayInSelectionRangeContentColor: Color,
    dividerColor: Color,
    dateTextFieldColors: TextFieldColors,
)

How to get one

Create it

Ready-made values and functions that return it

Used by

Parameters that take a DatePickerColors.

Properties

containerColor

val containerColor: Color

titleContentColor

val titleContentColor: Color

headlineContentColor

val headlineContentColor: Color

weekdayContentColor

val weekdayContentColor: Color

subheadContentColor

val subheadContentColor: Color
val navigationContentColor: Color

yearContentColor

val yearContentColor: Color

disabledYearContentColor

val disabledYearContentColor: Color

currentYearContentColor

val currentYearContentColor: Color

selectedYearContentColor

val selectedYearContentColor: Color

disabledSelectedYearContentColor

val disabledSelectedYearContentColor: Color

selectedYearContainerColor

val selectedYearContainerColor: Color

disabledSelectedYearContainerColor

val disabledSelectedYearContainerColor: Color

dayContentColor

val dayContentColor: Color

disabledDayContentColor

val disabledDayContentColor: Color

selectedDayContentColor

val selectedDayContentColor: Color

disabledSelectedDayContentColor

val disabledSelectedDayContentColor: Color

selectedDayContainerColor

val selectedDayContainerColor: Color

disabledSelectedDayContainerColor

val disabledSelectedDayContainerColor: Color

todayContentColor

val todayContentColor: Color

todayDateBorderColor

val todayDateBorderColor: Color

dayInSelectionRangeContainerColor

val dayInSelectionRangeContainerColor: Color

dayInSelectionRangeContentColor

val dayInSelectionRangeContentColor: Color

dividerColor

val dividerColor: Color

dateTextFieldColors

val dateTextFieldColors: TextFieldColors

Functions

copy

fun copy(
    containerColor: Color = this.containerColor,
    titleContentColor: Color = this.titleContentColor,
    headlineContentColor: Color = this.headlineContentColor,
    weekdayContentColor: Color = this.weekdayContentColor,
    subheadContentColor: Color = this.subheadContentColor,
    navigationContentColor: Color = this.navigationContentColor,
    yearContentColor: Color = this.yearContentColor,
    disabledYearContentColor: Color = this.disabledYearContentColor,
    currentYearContentColor: Color = this.currentYearContentColor,
    selectedYearContentColor: Color = this.selectedYearContentColor,
    disabledSelectedYearContentColor: Color = this.disabledSelectedYearContentColor,
    selectedYearContainerColor: Color = this.selectedYearContainerColor,
    disabledSelectedYearContainerColor: Color = this.disabledSelectedYearContainerColor,
    dayContentColor: Color = this.dayContentColor,
    disabledDayContentColor: Color = this.disabledDayContentColor,
    selectedDayContentColor: Color = this.selectedDayContentColor,
    disabledSelectedDayContentColor: Color = this.disabledSelectedDayContentColor,
    selectedDayContainerColor: Color = this.selectedDayContainerColor,
    disabledSelectedDayContainerColor: Color = this.disabledSelectedDayContainerColor,
    todayContentColor: Color = this.todayContentColor,
    todayDateBorderColor: Color = this.todayDateBorderColor,
    dayInSelectionRangeContainerColor: Color = this.dayInSelectionRangeContainerColor,
    dayInSelectionRangeContentColor: Color = this.dayInSelectionRangeContentColor,
    dividerColor: Color = this.dividerColor,
    dateTextFieldColors: TextFieldColors? = this.dateTextFieldColors,
): DatePickerColors

Returns a copy of this DatePickerColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source” // For dateTextFieldColors use null to mean "use the value from source"

Library docs

Represents the colors used by the date picker.