Input Age Model
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.
input Type
: The type of input : None : default, DateOfBirth : In ddmmyyyy format, Age: Age value with appropriate time unit
input Style
: Input shell style.
state
legend Data
supporting Text
: List of SupportingTextData that manages all the messages to be shown.
is Required
: Mark this input as marked.
ime Action
: keyboard ImeAction.
on Next Clicked
: call back to on next event.
date Of Birth Label
: text for the the date of birth selector.
or Label
: text for middle label.
age Label
: text for age selector.
accept Text
: text for date picker accept button.
cancel Text
: text for date picker cancel button.
on Value Changed
: Callback to receive changes in the input.
selectable Dates
: 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)