ExpirationField

fun ExpirationField(onValueChange: (ValidatedExpirationDate?) -> Unit, textStyle: TextStyle, shape: Shape, colors: TextFieldColors, textFieldPadding: PaddingValues, modifier: Modifier = Modifier, initialValue: ValidatedExpirationDate = ValidatedExpirationDate(), separator: String = " / ", label: @Composable () -> Unit?)

Composable function representing an input field for entering expiration dates of credit cards.

Parameters

onValueChange

The callback triggered when the value of the expiration date changes. It receives the entered expiration date information. The value is non-null, call getValidatedMonthAndYear() to get the month and year integer pair, which will itself be null if the month or year are not valid.

textStyle

The text style to be applied to the input text.

shape

The shape customization for the expiration date input field.

colors

The colors customization for the text field.

textFieldPadding

The padding to be applied to the input field.

modifier

The modifier for the expiration date input field.

initialValue

The initial value to populate the expiration date input field. Used to update from OCR.

separator

The separator string used to visually separate the month and year values.

label

The composable function used to display the label for the input field. It provides a label as a content parameter.