You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DateCalendar issue with customized Dialog TransitionComponent.
It seems that using custom TransitionComponent in Dialog's animation is conflicting DateCalendar's animation.
MUI: A component is changing the uncontrolled value state of DateCalendar to be controlled.
Elements should not switch from uncontrolled to controlled (or vice versa).
Decide between using a controlled or uncontrolled DateCalendar element for the lifetime of the component.
The nature of the state is determined during the first render. It's considered controlled if the value is not undefined.
More info: https://fb.me/react-controlled-components
Expected behavior 🤔
No response
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered:
I've tried reproducing your use case in codesandbox.
Could you clarify where do you seem to have problems, because I was not able to see the error you are talking about. 🤷
LukasTy
changed the title
DateCalendar issue with customized Dialog TransitionComponent
[pickers] DateCalendar issue with customized Dialog TransitionComponent
Aug 25, 2023
Thank you for providing the updated code.
In your new example, there is a tiny error in the code.
You have this interesting behavior with a useEffect and timeout, which sets the open state and the current date value.
Consider the need for this useEffect altogether as it seems that simply having the current date value set in the initial state and open on the dialog is enough. 🤔
If the first option does not cover certain use cases and is still needed, please update the initial state of dateSelected to the correct empty value to signal that you are going to control the value, rather than providing nothing on the initial render.
Duplicates
Latest version
Steps to reproduce 🕹
DateCalendar issue with customized Dialog TransitionComponent.
It seems that using custom TransitionComponent in Dialog's animation is conflicting DateCalendar's animation.
Test code below (updated 8/25/2023):
Current behavior 😯
MUI: A component is changing the uncontrolled value state of DateCalendar to be controlled.
Elements should not switch from uncontrolled to controlled (or vice versa).
Decide between using a controlled or uncontrolled DateCalendar element for the lifetime of the component.
The nature of the state is determined during the first render. It's considered controlled if the value is not
undefined
.More info: https://fb.me/react-controlled-components
Expected behavior 🤔
No response
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: