mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
3.92k stars 1.2k forks source link

Date range picker selecting future date reset the value #13535

Closed arjaym-dev closed 1 week ago

arjaym-dev commented 2 weeks ago

The problem in depth

Click this to see the demo of the said behavior

Step to produce the said behavior:

You'll notice that the from date become Jun 21, then the to date is don't have value. Is there any solution or options for that ?

My workaround solution

Your environment

`npx @mui/envinfo` ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```

Search keywords: date range picker, reset value, future, selecting future date Order ID: 70493

LukasTy commented 2 weeks ago

Hello @arjaym-dev, your described behavior looks like a general rule that is common among most if not all date range pickers. Here are the examples (in no particular order, just some unordered result from a google search), which are behaving the same:

Could you describe you expected behavior in more detail? P.S. Your linked codesandbox is not accessible (probably set to private).

arjaym-dev commented 2 weeks ago

Hello @LukasTy i've already update the link to public you may be able to view it now. Thanksss

LukasTy commented 2 weeks ago

@arjaym-dev Thank you for making the codesandbox public, but it still unclear what is your expected behavior. What do you think is lacking from the component side? Your commented code causes UX issues—users are basically no longer able to reset the range without other external means. Also, as shown in the other examples—it seems that most if not all other range picker components are behaving in the same way as @mui/x-date-pickers-pro.

github-actions[bot] commented 1 week ago

The issue has been inactive for 7 days and has been automatically closed.