Is there any way to implement animation for DatePi...
# multiplatform
z
Is there any way to implement animation for DatePickerDialog on jvm platform? I tried animated visibility + dialog but it still dosen't work. My code:
Copy code
val datePickerState = rememberDatePickerState(
    initialSelectedDateMillis = selectedDate
)


DatePickerDialog(
    onDismissRequest = { showModal = false },
    confirmButton = {
        FilledTonalButton(
            modifier = Modifier
                .padding(vertical = 16.dp),
            onClick = {
                selectedDate = datePickerState.selectedDateMillis
                showModal = false
            }
        ) {
            Text("OK")
        }
    },
    dismissButton = {
        FilledTonalButton(
            modifier = Modifier
                .padding(16.dp),
            onClick = { showModal = false },
        ) {
            Text("Cancel")
        }
    }
) {
    DatePicker(state = datePickerState, showModeToggle = false)
}
v
I can't use DatePickerDialog at all - crashes on composition for me, even just the call to
rememberDatePickerState
causes a crash.
z
Check this to fix crash on rememberDatePickerState https://stackoverflow.com/questions/79759204/can-not-use-kotlinx-datetime0-7-1-library-with-rememberdatepickerstate-functi This is basically because kotlix-datetime removes a api at 7.0.0 and kmp have not yet released their changes
v
Got it now 🙂 Found a comment on a ticket in YouTrack.