-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Replace MaterialUiPickersDate type with DateType #1962
Comments
Also, it's worth noting that in the Autocomplete, there is a prop that prevents the value to be |
It looks like we must get rid of DateType at all. Because it is not working as it should anymore. Ts 3.9 is not inferring as dynamic type. The reason of #1861 |
Interesting, it sounds like there is work to be done here :). A couple of more thoughts:
|
Looking at the codebase, I believe we could gain in clarity by
DateType
from@date-io/type
so we can doimport { DateType } from '@material-ui/pickers'
MaterialUiPickersDate
withDateType | null
everywhere in the codebaseThis discussion first started in #1955 (comment).
Also, I have noticed a couple of places where
| null
seems redundant, for instance:https://github.com/mui-org/material-ui-pickers/blob/8f895d5e438dcc8f7f04837763979a3009d777dc/lib/src/views/Calendar/useCalendarState.tsx#L11
For reference:
https://github.com/mui-org/material-ui-pickers/blob/8f895d5e438dcc8f7f04837763979a3009d777dc/lib/src/typings/date.ts#L1-L3
The text was updated successfully, but these errors were encountered: