Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pickers][DatePicker] disableOpenPicker disables the entire picker, not just the picker icon as per the docs #13201

Closed
AdamBeWell opened this issue May 22, 2024 · 3 comments
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@AdamBeWell
Copy link

AdamBeWell commented May 22, 2024

Steps to reproduce

Link to live example: https://stackblitz.com/edit/react-ewyrms?file=Demo.tsx

Steps:

  1. Open the example
  2. The picker should open but only actionbar is rendered.

Current behavior

The picker icon is not rendered and neither is the entire picker, except for the action bar for some reason.

Expected behavior

As per the docs and the behavior in v5, disableOpenPicker should only hide the picker icon, not the picker itself.

Context

I'm upgrading from v5 and this seems to be an undocumented breaking change.
I tried with a couple versions of v6 and it seems the problem was also present in those.
#11618 mentions a similar problem but specifically for MobileDatePicker. My problem is also in DesktopDatePicker.

Your environment

npx @mui/envinfo
  System:
    OS: Windows 11 10.0.22621
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.5 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (123.0.2420.97)
  npmPackages:
    @emotion/react: ^11.11.1 => 11.11.4
    @emotion/styled: ^11.11.0 => 11.11.5
    @mui/base:  5.0.0-beta.40
    @mui/core-downloads-tracker:  5.15.18
    @mui/icons-material: 5.14.19 => 5.14.19
    @mui/lab: ^5.0.0-alpha.155 => 5.0.0-alpha.170
    @mui/material: ^5.15.18 => 5.15.18
    @mui/private-theming:  5.15.14
    @mui/styled-engine:  5.15.14
    @mui/system:  5.15.15
    @mui/types:  7.2.14
    @mui/utils:  5.15.14
    @mui/x-data-grid:  7.5.0
    @mui/x-data-grid-pro: 7.5.0 => 7.5.0
    @mui/x-date-pickers:  7.5.0
    @mui/x-date-pickers-pro: 7.5.0 => 7.5.0
    @mui/x-license:  7.2.0
    @types/react: 18.2.37 => 18.2.37
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0
    typescript: ^5.3.3 => 5.4.5

Search keywords: disableOpenPicker
Order ID: 71270

@AdamBeWell AdamBeWell added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 22, 2024
@michelengelen
Copy link
Member

@LukasTy it seems like when using disableOpenPicker the renderer do not receive the UI viewmode.

I'll add this to the board to fix.

@michelengelen michelengelen changed the title [datepicker] disableOpenPicker disables the entire picker, not just the picker icon as per the docs [pickers][DatePicker] disableOpenPicker disables the entire picker, not just the picker icon as per the docs May 22, 2024
@michelengelen michelengelen added bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 22, 2024
@LukasTy
Copy link
Member

LukasTy commented May 22, 2024

Thank you @AdamBeWell for opening this issue. 🙏
It looks like a direct duplicate of #11618 as the root cause is the same.
I'm escalating its priority and going to fix it.
Closing this issue as a duplicate. 😉

@LukasTy LukasTy closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@LukasTy LukasTy added the duplicate This issue or pull request already exists label May 22, 2024
Copy link

⚠️ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@AdamBeWell: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants