InputDateTimeModel

data class InputDateTimeModel(val title: String, val inputTextFieldValue: TextFieldValue?, val actionType: DateTimeActionType = DateTimeActionType.DATE_TIME, val allowsManualInput: Boolean = true, val state: InputShellState = InputShellState.UNFOCUSED, val legendData: LegendData? = null, val supportingText: List<SupportingTextData>? = null, val onActionClicked: () -> Unit? = null, val onNextClicked: () -> Unit? = null, val isRequired: Boolean = false, val imeAction: ImeAction = ImeAction.Next, val visualTransformation: DateTimeVisualTransformation = DateTransformation(), val format: String = "ddMMyyyy", val onFocusChanged: (Boolean) -> Unit = {}, val onValueChanged: (TextFieldValue?) -> Unit, val is24hourFormat: Boolean = false, val inputStyle: InputStyle = InputStyle.DataInputStyle(), val acceptText: String? = null, val cancelText: String? = null, val selectableDates: SelectableDates = SelectableDates("01011940", "12312300"), val yearRange: IntRange = IntRange(1970, 2070), val outOfRangeText: String? = null, val incorrectHourFormatText: String? = null)

UiModel used for InputDateTime

Parameters

title

: Label of the component.

inputTextFieldValue

: Input of the component in the format of ddMMyyyy/HHMM/ddMMyyyyHHMM.

allowsManualInput

: if true the user can utilize the keyboard to enter the date.

onActionClicked

: Callback to override the action when the calendar icon is clicked. material3 DatePicker or Timepicker will be used calling onValueChanged after selecting a date or time.

legendData
supportingText

: List of SupportingTextData that manages all the messages to be shown.

onNextClicked

: gives access to the on next callback.

onFocusChanged

: gives access to the on Focus changed callback.

isRequired

: Mark this input as marked.

visualTransformation

: Pass a visual transformation to format the date input visually. By default uses DateTransformation.

format

: the date value format, current supported formats are -> ddMMyyyy and MMddyyyy.

is24hourFormat

: only applies if input is of type DateTime or Time, manages whether the TimePicker is on 24 hour format or not.

inputStyle

: gives access to InputShell style parameters.

selectableDates

: a SelectableDates object that takes in two dates as strings in ddMMyyyy format and will not allow selection for the date picker, default value will be -> SelectableDates("01011940","12312300").

acceptText

: manages the DatePicker confirm button text.

cancelText

: manages the DatePicker cancel button text.

yearRange

: manages the year range to be shown.

onValueChanged

: Callback to receive changes in the input in the following formats: , , .

imeAction

: the keyboard ImeAction

incorrectHourFormatText

: error text to be used if hour format is incorrect.

outOfRangeText

: error text to be used if date is out of range.

Constructors

Link copied to clipboard
constructor(title: String, inputTextFieldValue: TextFieldValue?, actionType: DateTimeActionType = DateTimeActionType.DATE_TIME, allowsManualInput: Boolean = true, state: InputShellState = InputShellState.UNFOCUSED, legendData: LegendData? = null, supportingText: List<SupportingTextData>? = null, onActionClicked: () -> Unit? = null, onNextClicked: () -> Unit? = null, isRequired: Boolean = false, imeAction: ImeAction = ImeAction.Next, visualTransformation: DateTimeVisualTransformation = DateTransformation(), format: String = "ddMMyyyy", onFocusChanged: (Boolean) -> Unit = {}, onValueChanged: (TextFieldValue?) -> Unit, is24hourFormat: Boolean = false, inputStyle: InputStyle = InputStyle.DataInputStyle(), acceptText: String? = null, cancelText: String? = null, selectableDates: SelectableDates = SelectableDates("01011940", "12312300"), yearRange: IntRange = IntRange(1970, 2070), outOfRangeText: String? = null, incorrectHourFormatText: String? = null)

Properties

Link copied to clipboard
val acceptText: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val cancelText: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val is24hourFormat: Boolean = false
Link copied to clipboard
val isRequired: Boolean = false
Link copied to clipboard
val legendData: LegendData? = null
Link copied to clipboard
val onActionClicked: () -> Unit? = null
Link copied to clipboard
Link copied to clipboard
val onNextClicked: () -> Unit? = null
Link copied to clipboard
Link copied to clipboard
val outOfRangeText: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard