Package-level declarations
Types
Functions
Link copied to clipboard
fun CalendarDatePicker(datePickerState: CalendarDatePickerState, label: String, value: String, expanded: Boolean, onValueChange: (String) -> Unit, onExpandedChange: (Boolean) -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, placeholderText: String = "", helperText: String = "", inputState: TextInputState = TextInputState.Enabled, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, dayOfWeekNames: DayOfWeekNames = DayOfWeekNames.ENGLISH_ABBREVIATED, yearFormat: DateTimeFormat<YearMonth> = YearMonth.Format {
year()
}, monthFormat: DateTimeFormat<YearMonth> = YearMonth.Format {
monthName(MonthNames.ENGLISH_FULL)
}, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
Calendar pickers default to showing today’s date when opened and only one month is shown at a time. Calendar pickers allow users to navigate through months and years, however they work best when used for recent or near future dates. If a user needs to input a far distant or future date consider having the calendar default open to a more convenient day.
Link copied to clipboard
fun rememberCalendarDatePickerState(today: LocalDate, initialSelectedDate: LocalDate? = null, dateFormat: DateTimeFormat<LocalDate> = LocalDate.Format {
year(); char('/'); monthNumber(); char('/'); day()
}, selectableDates: SelectableDates = SelectableDates { true }, onFieldValidation: (Boolean?) -> Unit = {}): CalendarDatePickerState
Creates a CalendarDatePickerState that is remembered across compositions.