datepicker
fun MaterialDialogScope.datepicker( initialDate: LocalDate = LocalDate.now(), title: String = "SELECT DATE", colors: DatePickerColors = DatePickerDefaults.colors(), yearRange: IntRange = IntRange(1900, 2100), waitForPositiveButton: Boolean = true, allowedDateValidator: (LocalDate) -> Boolean = { true }, locale: Locale = Locale.getDefault(), onDateChange: (LocalDate) -> Unit = {})
Content copied to clipboard
Parameters
initialDate
time to be shown to the user when the dialog is first shown. Defaults to the current date if this is not set
yearRange
the range of years the user should be allowed to pick from
waitForPositiveButton
if true the onDateChange callback will only be called when the positive button is pressed, otherwise it will be called on every input change
onDateChange
callback with a LocalDateTime object when the user completes their input
allowedDateValidator
when this returns true the date will be selectable otherwise it won't be