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.98k stars 1.22k forks source link

[DateRangePicker] Automatically fill the end date #7598

Open blueinfinitycz opened 1 year ago

blueinfinitycz commented 1 year ago

Currently, i am facing the usecase, that client want to have automatic filled "end" or "latest time" in date picker, if the user doesnot pick. This feature could be optional and could take params of the latest date as default string or directly from client/server config current date/time. What do you think? Would be possible such feature create in new version, please?

flaviendelangle commented 1 year ago

Hi,

I don't know what is the exact behavior you are looking for. But you should be able to implement it by controlling the value and applying your end date when you want

Have a look at this example which shows 2 basic implementations.