For those need to set min, max date in datetime pi...
# multiplatform
t
For those need to set min, max date in datetime picker material 3 mutilplatform.
Copy code
val datePickerState = rememberDatePickerState(
        initialSelectedDateMillis = inputDate?.toInstant(DateUtils.instance.tzEnglish)
            ?.toEpochMilliseconds(),
        selectableDates = object : SelectableDates {
            override fun isSelectableDate(utcTimeMillis: Long): Boolean {
                val currentDatePicker = Instant.fromEpochMilliseconds(utcTimeMillis)
                    .toLocalDateTime(DateUtils.instance.tzEnglish)
                return DateUtils.instance.dateToTimestamp(DateUtils.instance.currentDate())!! > DateUtils.instance.dateToTimestamp(currentDatePicker)!!
            }
        })