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.57k stars 1.34k forks source link

[pickers] Support keyboard entry on mobile #7869

Open aleksey-lav opened 1 year ago

aleksey-lav commented 1 year ago

Duplicates

Latest version

Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/silly-mirzakhani-dhigkw?file=/demo.tsx:1142-1158&resolutionWidth=320&resolutionHeight=675

Nothing happens if we add the prop disableOpenPicker to the component

Current behavior 😯

MobileTimePicker is opening with standard Clock view for choosing the time even disableOpenPicker is present as true

Expected behavior 🤔

The expectation to have a possibility to set the time without Clock, by typing as in DesktopTimePicker

Context 🔦

No response

Your environment 🌎

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

Thank you for opening this issue! Please refer to the API documentation or JSDoc in IDE for a prop description. The current v5 release, has the following description for this prop:

Do not render open picker button (renders only text field with validation).

If you need to disable the component altogether, please refer to the disabled or readOnly props.

As for your mentioned "Expected behavior": we've had discussions about it, but I can't find any issue mentioning it, so I'll rename this one to better reflect the intent unless @flaviendelangle knows the issue we are talking about.

LukasTy commented 11 months ago

Also correctly handle the clearable behavior with the removal of readonly mobile Pickers. https://github.com/mui/mui-x/issues/10842#issuecomment-1870298882

LukasTy commented 3 months ago

We agreed to unify the field/input behavior on Mobile Pickers allowing editing in them just like React Spectrum does. This would be a behavioral breaking change, thus, we are keeping it for the next major.

Once that is done, having the disableOpenPicker prop no longer makes sense as similar modifications can be done through the field slot, thus, we should deprecate it.

flaviendelangle commented 3 months ago

as similar modifications can be done through the field slo

Or by just rendering the field component. Something like:

<DateField InputProps={{ endAdorment: "I don't remember the name of the icon" }} />