Describe the bug
There is a crash (runtime error DateTimeException) when you use material3.DatePicker in DisplayMode.Input and enter incorrect date like 50/50/2024. Only reproduces in Web, all other targets work correctly.
Affected platforms
Web (K/Wasm) - Canvas based API
Web (K/JS) - Canvas based API
Versions
Libraries:
Compose Multiplatform version: 1.6.1, 1.6.10
Kotlin version: 1.9.23, 2.0.0
To Reproduce
Steps to reproduce the behavior:
Run this code snippet:
@Composable
fun BugReproduction() {
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
val state = rememberDatePickerState(initialDisplayMode = DisplayMode.Input)
DatePicker(state = state)
}
}
Enter 50/50/2024 date
See error
Expected behavior
There should be no crash but the error tip like "Date does not match expected pattern" like on all other platforms
Describe the bug There is a crash (runtime error DateTimeException) when you use
material3.DatePicker
inDisplayMode.Input
and enter incorrect date like50/50/2024
. Only reproduces in Web, all other targets work correctly.Affected platforms
Versions
To Reproduce Steps to reproduce the behavior:
Expected behavior There should be no crash but the error tip like "Date does not match expected pattern" like on all other platforms
Screenshots Web crash:
Desktop ok: