NepaliDatePickerDocked

fun NepaliDatePickerDocked(state: NepaliDatePickerState, modifier: Modifier = Modifier, label: @Composable () -> Unit? = null, placeholder: @Composable () -> Unit? = null, trailingIcon: @Composable () -> Unit? = null, prefix: @Composable () -> Unit? = null, suffix: @Composable () -> Unit? = null, dateFormatStyle: NepaliDateFormatStyle = NepaliDateFormatStyle.MEDIUM, showTodayButton: Boolean = true, textStyle: TextStyle = LocalTextStyle.current, shape: Shape = OutlinedTextFieldDefaults.shape, interactionSource: MutableInteractionSource? = null, popupShape: Shape = NepaliDatePickerDefaults.shape, popupShadowElevation: Dp = DockedPopupElevation, colors: NepaliDatePickerColors = NepaliDatePickerDefaults.colors())(source)

A docked / compact Nepali date picker: a read-only text field showing the selected date, with a trailing calendar button that opens the NepaliDatePicker in a dropdown anchored to the field.

This is the Material 3 "docked" pattern - the right default for forms and desktop / web, where a full modal dialog is heavier than needed. Picking a date fills the field and closes the dropdown.

Parameters

state

the NepaliDatePickerState driving the field and the calendar. See rememberNepaliDatePickerState.

modifier

the Modifier applied to the field container.

label

optional label for the text field.

placeholder

optional placeholder shown when no date is selected.

trailingIcon

optional trailing content that replaces the built-in calendar button; when you supply one, wire its own click to toggle the dropdown if you want that behavior.

prefix

optional inline content shown before the date text.

suffix

optional inline content shown after the date text.

dateFormatStyle

the NepaliDateFormatStyle used to render the selected date in the field.

showTodayButton

whether the calendar shows its TODAY button.

textStyle

the TextStyle applied to the field text.

shape

the Shape of the text field.

interactionSource

the MutableInteractionSource for the text field, or null for a remembered one.

popupShape

the Shape of the dropdown calendar surface.

popupShadowElevation

the shadow elevation of the dropdown calendar surface.

colors

the NepaliDatePickerColors; its dateTextFieldColors theme the field.

Example usage:

val state = rememberNepaliDatePickerState()
NepaliDatePickerDocked(state = state, label = { Text("Date") })

See also