KwikDateFieldButton

fun KwikDateFieldButton(modifier: Modifier = Modifier, label: String? = null, placeholder: String = "", displayFormat: String = "d MMM yyyy", selected: (LocalDate) -> Unit, border: BorderStroke? = null, shape: Shape = MaterialTheme.shapes.medium, mode: KwikDatePickerMode = KwikDatePickerMode.Hybrid, leadingIcon: @Composable () -> Unit? = { Icon( painter = painterResource(id = R.drawable.calendar), tint = MaterialTheme.colorScheme.onSurface, contentDescription = null, ) }, trailingIcon: @Composable () -> Unit? = { Icon( imageVector = Icons.Default.KeyboardArrowDown, tint = MaterialTheme.colorScheme.onSurface, contentDescription = null, ) })

A hybrid date field that supports picking a date from a date picker dialog or editing the date manually.

Parameters

modifier

: The modifier for the date field.

label

: The label for the date field.

placeholder

: The placeholder text for the date field.

displayFormat

: The format to display the date in.

selected

: The callback that is called when a date is selected. Returns in format: yyyy-MM-dd

border

: The border for the date field.

shape

: The shape for the date field.

mode

: The mode for the date field. Defaults to HYBRID, allowing for manual editing or date picker selection.

leadingIcon

: The leading icon for the date field.

trailingIcon

: The trailing icon for the date field.