-
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
[docs] Document how to use a custom input with renderInput #1751
Comments
https://material-ui.com/api/text-field/#textfield-api Here is an api of text field. All you need is to properly spread props down to the input. For the basic usage you need to spread |
@dmtrKovalenko I am not sure we are talking about the same. I can not use DatePicker with just pure HTML Everything is good with the |
I understand. It works correctly: https://codesandbox.io/s/long-surf-vx1rw?file=/src/App.jsx |
@dmtrKovalenko this is what I see from the example:
|
Yes, because you don't have a button which will open a picker. Please make a You can check https://github.com/mui-org/material-ui/blob/50c0bbc3a2040c9945f5009a6bd56292d216f236/packages/material-ui/src/TextField/TextField.js for reference |
Here is I added button with |
@IgorTurko https://codesandbox.io/s/vigilant-resonance-ebodt?file=/src/App.jsx Github issues are not the best place for asking questions. If you need to ask "how" to achvie something please use StackOverflow and tag [material-ui] |
Considering @CodingDive feedback in #1750 (comment) and @IgorTurko ones, I think that we should introduce a new customization demo with the DatePicker. For instance, we could implement one of these designs: It would both be useful to showcase how to use the renderInput API as well as customize the popup. |
Hello Guys, And it was what I wanted, maybe it helps someone. |
Environment
I have this DatePicker
And this custom TextField:
But there are several problems:
Failed prop type: You provided a "value" prop to a form field without an "onChange" handler.
Not clear why is that onChange does not propagated?Could you guys maybe share small example how to use renderInput with custom html input?
The text was updated successfully, but these errors were encountered: