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, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, textStyle: TextStyle = LocalTextStyle.current, shape: Shape = OutlinedTextFieldDefaults.shape, interactionSource: MutableInteractionSource? = null, popupShape: Shape = NepaliDatePickerDefaults.shape, popupShadowElevation: Dp = DockedPopupElevation, colors: NepaliDatePickerColors = NepaliDatePickerDefaults.colors(), dayDecorator: NepaliDayDecorator? = null)(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.

showCalendarSystemToggle

whether the dropdown calendar shows the B.S. / A.D. switch. The field itself always reads the selected date in Bikram Sambat.

showAdjacentMonthDays

whether the dropdown calendar fills its empty cells with the neighbouring months' days, drawn faded. Tapping one selects that day and moves the grid to its month.

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.

dayDecorator

marks days in the dropdown calendar that carry a holiday, a festival or an app's own event, with dots under the day number and a color for the number itself. null, the default, leaves every day as the theme draws it. See NepaliDatePickerDefaults.eventDecorator and NepaliDatePickerDefaults.dayDecorator.

Example usage:

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

See also