InputAgeModel

data class InputAgeModel(val title: String, val inputType: AgeInputType = None, val inputStyle: InputStyle = InputStyle.DataInputStyle(), val state: InputShellState = InputShellState.UNFOCUSED, val legendData: LegendData? = null, val supportingText: List<SupportingTextData>? = null, val isRequired: Boolean = false, val imeAction: ImeAction = ImeAction.Next, val onNextClicked: () -> Unit? = null, val dateOfBirthLabel: String? = null, val orLabel: String? = null, val ageLabel: String? = null, val acceptText: String? = null, val cancelText: String? = null, val onValueChanged: (AgeInputType) -> Unit, val selectableDates: SelectableDates? = null)

Data model used for DHIS2 InputAge component.

Parameters

title

: Label of the component.

inputType

: The type of input : None : default, DateOfBirth : In ddmmyyyy format, Age: Age value with appropriate time unit

inputStyle

: Input shell style.

legendData
supportingText

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

isRequired

: Mark this input as marked.

imeAction

: keyboard ImeAction.

onNextClicked

: call back to on next event.

dateOfBirthLabel

: text for the the date of birth selector.

orLabel

: text for middle label.

ageLabel

: text for age selector.

acceptText

: text for date picker accept button.

cancelText

: text for date picker cancel button.

onValueChanged

: Callback to receive changes in the input.

selectableDates

: allowed dates for date picker.

Constructors

Link copied to clipboard
constructor(title: String, inputType: AgeInputType = None, inputStyle: InputStyle = InputStyle.DataInputStyle(), state: InputShellState = InputShellState.UNFOCUSED, legendData: LegendData? = null, supportingText: List<SupportingTextData>? = null, isRequired: Boolean = false, imeAction: ImeAction = ImeAction.Next, onNextClicked: () -> Unit? = null, dateOfBirthLabel: String? = null, orLabel: String? = null, ageLabel: String? = null, acceptText: String? = null, cancelText: String? = null, onValueChanged: (AgeInputType) -> Unit, selectableDates: SelectableDates? = null)

Properties

Link copied to clipboard
val acceptText: String? = null
Link copied to clipboard
val ageLabel: String? = null
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
val isRequired: Boolean = false
Link copied to clipboard
val legendData: LegendData? = null
Link copied to clipboard
val onNextClicked: () -> Unit? = null
Link copied to clipboard
Link copied to clipboard
val orLabel: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard