Has anyone used the MUI date picker via the MUI Wr...
# javascript
m
Has anyone used the MUI date picker via the MUI Wrapper? It seems like a few properties are missing. The below makes something that creates a textbox, that, when clicked, will show the popup and receive selection events.
Copy code
LocalizationProvider {
    dateAdapter = AdapterDateFns
    MobileDatePicker {
        componentsProps
        asDynamic().onChange = { it: Date ->
            println(it.getTime())
        }

        asDynamic().renderInput = { it: BaseTextFieldProps ->
            TextField.create {
                onClick = it.onClick
                value = it.value
                label = it.label
            }
        }
    }
}
Kotlin MUI showcase only has an inline calendar: https://karakum-team.github.io/kotlin-mui-showcase/#/pickers I want to use the MUI date pickers as per: https://mui.com/x/react-date-pickers/getting-started/ Any examples or suggestions? Sorry I'm not that familiar with the JS/React side of things. Do I need to make a new wrapper file with the actual properties, or am I missing something?
t
It’s preferrable to have
Props
extensions in this case: 1. No
dynamic
please 2. After wrappers update you will see which extensions are redundant
👍 1
m
Got it, makes sense, thank you! Now I see a similar approach used in MissedWrappers.kt on MUI showcase.
👌 1
245 Views