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/
4.14k stars 1.29k forks source link

[fields] simplify reset of the date #8304

Open sodenn opened 1 year ago

sodenn commented 1 year ago

Duplicates

Latest version

Summary 💡

Clearing the date has become a bit more complicated in v6. In v5, the user could reset the date by selecting it with the mouse and pressing Backspace, or by placing the cursor at the end of the date and pressing Backspace until the date is cleared. Unfortunately, this no longer works and makes resetting the date more difficult, especially for casual users who work without keyboard shortcuts.

Possible improvements:

Examples 🌈

No response

Motivation 🔦

No response

Order ID 💳 (optional)

No response

LukasTy commented 1 year ago

Thank you for the suggestions. We'll look into the most appropriate solution to handle date re-setting. What do you think about a similar pattern to what is used in Autocomplete (an X button appearing when a value is present)?

This is related to #4450

flaviendelangle commented 1 year ago

That's an interesting topics

A few thoughs:

I'm wondering if we could respect the user selection more precisely. The double click would be a quick win.

More complex: If the user start clicking on the 1st section, then drag to the last and stop clicking (the way they did it in v5), could we select all the sections ? Could we even let the user select only 2 or 3 sections and clean them ? Right now it's 1 section or all sections, we don't support partial selections in between.

What about the range fields ? Double clicking should select on date or both ? If it selects one date, we have again the topic of partial selections.

flaviendelangle commented 1 year ago

This issue relates closely to #4450, which only focused on the closing adornment.