This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Parameterized Dropdown for Jetpack Compose and Material3 | |
* @param options list of options to display | |
* @param selectedValue the selected value for this field | |
* @param itemValue method called to determine the selected value matching options | |
* @param textValue the method called on object to display its label | |
* @param placeholder the placeholder displayed in the textfield | |
* @param enabled enable or disable the field | |
* @param onChange called when option is selected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OptIn(ExperimentalMaterial3Api::class) | |
@Composable | |
fun DatePickerWithDialog( | |
value: LocalDate?, | |
dateFormatter: (LocalDate) -> String, | |
enabled: Boolean = true, | |
placeholder: @Composable (() -> Unit)? = null, | |
dateValidator: (Long) -> Boolean = { true }, | |
onChange: (LocalDate?) -> Unit |