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

DateRangePickerDefaults

@ExperimentalMaterial3Api
public static class DateRangePickerDefaults


Contains default values used by the DateRangePicker.

Summary

Public fields

static @NonNull DateRangePickerDefaults

Public methods

final void
@Composable
DateRangePickerHeadline(
    Long selectedStartDateMillis,
    Long selectedEndDateMillis,
    @NonNull DisplayMode displayMode,
    @NonNull DatePickerFormatter dateFormatter,
    @NonNull Modifier modifier
)

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

final void
@Composable
DateRangePickerTitle(
    @NonNull DisplayMode displayMode,
    @NonNull Modifier modifier
)

A default date range picker title composable.

Public fields

INSTANCE

public static @NonNull DateRangePickerDefaults INSTANCE

Public methods

DateRangePickerHeadline

@Composable
public final void DateRangePickerHeadline(
    Long selectedStartDateMillis,
    Long selectedEndDateMillis,
    @NonNull DisplayMode displayMode,
    @NonNull DatePickerFormatter dateFormatter,
    @NonNull Modifier modifier
)

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

Parameters
Long selectedStartDateMillis

a timestamp that represents the selected start date start of the day in UTC milliseconds from the epoch

Long selectedEndDateMillis

a timestamp that represents the selected end date start of the day in UTC milliseconds from the epoch

@NonNull DisplayMode displayMode

the current DisplayMode

@NonNull DatePickerFormatter dateFormatter

a DatePickerFormatter

@NonNull Modifier modifier

a Modifier to be applied for the headline

DateRangePickerTitle

@Composable
public final void DateRangePickerTitle(
    @NonNull DisplayMode displayMode,
    @NonNull Modifier modifier
)

A default date range picker title composable.

Parameters
@NonNull DisplayMode displayMode

the current DisplayMode

@NonNull Modifier modifier

a Modifier to be applied for the title