Function

setSelectedDate

Sets the DatePickerState.selectedDateMillis based on a given LocalDate.

setSelectedDate

Source set: JvmAndAndroid
public fun DatePickerState.setSelectedDate(date: LocalDate?)

Sets the DatePickerState.selectedDateMillis based on a given LocalDate.

Converts the LocalDate to the start of the day (midnight) in UTC and apply it to the DatePickerState selectedDateMillis. Setting null clears the selection.

Parameters

date The LocalDate to select, or null to clear the selection.
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: