setDisplayedMonth

Function

Jvm
@RequiresApi(26)
@ExperimentalMaterial3Api
fun DatePickerState.setDisplayedMonth(yearMonth: YearMonth)

Sets the DatePickerState.displayedMonthMillis based on a given YearMonth.

Converts the YearMonth to the start of the first day of that month (midnight) in UTC and apply it to the DatePickerState displayedMonthMillis.

Parameters

yearMonthThe YearMonth to display.
Jvm
@RequiresApi(26)
@ExperimentalMaterial3Api
fun DateRangePickerState.setDisplayedMonth(yearMonth: YearMonth)

Sets the DateRangePickerState.displayedMonthMillis based on a given YearMonth.

Converts the YearMonth to the start of the first day of that month (midnight) in UTC and apply it to the DateRangePickerState displayedMonthMillis.

Parameters

yearMonthThe YearMonth to display.