Function

setDisplayedMonth

Sets the DatePickerState.displayedMonthMillis based on a given YearMonth.

setDisplayedMonth

Source set: JvmAndAndroid
public 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

yearMonth The YearMonth to display.

setDisplayedMonth

Source set: JvmAndAndroid
public 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

yearMonth The YearMonth to display.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: