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] AM/PM Behavior in the Calendar control #13693

Closed
developingjames opened this issue Jul 1, 2024 · 2 comments
Closed

[pickers] AM/PM Behavior in the Calendar control #13693

developingjames opened this issue Jul 1, 2024 · 2 comments
Labels
component: DateTimePicker The React component. component: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component. duplicate This issue or pull request already exists

Comments

@developingjames
Copy link

developingjames commented Jul 1, 2024

Steps to reproduce

Link to live example: (required)
https://codesandbox.io/p/sandbox/compassionate-firefly-vs9597

Steps:

  1. Click on the calendar icon
  2. Hover over AM/PM
  3. Note the presence of the scrollbar for the AM/PM column when it is not necessary.
  4. Click PM
  5. Note that the dialog immediately closes

Current behavior

When hovering over the AM/PM Column a vertical scrollbar appears when it is not necessary to scroll.

When clicking either AM or PM, the dialog is closed.

Expected behavior

Do not show a vertical scrollbar when hovering over the AM/PM column.

Do not close the dialog when I select AM/PM. Instead rely on the OK button to close the dialog. I may want to pick PM for the current day and then my time.

Context

I was trying to pick a time 2 minutes into the future of the current day for testing a schedule feature in our application when I noticed the behavior. The time was 3:00 pm EDT and I wanted to select 3:02 pm. It was my first time using the control and I picked PM before going to select the time.

I tested in:
Chrome Desktop Version 126.0.6478.114 (Official Build) (64-bit)

Your environment

npx @mui/envinfo System: OS: Windows 11 10.0.22631 Binaries: Node: 20.13.1 - ~\AppData\Local\fnm_multishells\19804_1719846675017\node.EXE npm: 10.5.2 - ~\AppData\Local\fnm_multishells\19804_1719846675017\npm.CMD pnpm: Not Found Browsers: Chrome: Not Found Edge: Chromium (126.0.2592.81)

Search keywords: Calendar AM PM Scrollbar

Search keywords:

@developingjames developingjames added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 1, 2024
@zannager zannager transferred this issue from mui/material-ui Jul 1, 2024
@zannager zannager added the component: pickers This is the name of the generic UI component, not the React module! label Jul 1, 2024
@LukasTy
Copy link
Member

LukasTy commented Jul 2, 2024

Hello @developingjames
Thank you for creating this issue and using the Pickers package. 🙏

For the meridiem section behavior, there is already an issue (#9310) and a proposal to do just what you are suggesting (set closeOnSelect={false} by default).
P.S. You can do it on your end to get this behavior now. 😉

As for the scrollbar on the meridiem section—the extra height is necessary because of a design decision to scroll the selected section to the top of the container.

I'm closing this issue as a duplicate.
If you think there are still problems with it—feel free to reopen it, comment, or create a new issue. 😃

@LukasTy LukasTy closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
Copy link

github-actions bot commented Jul 2, 2024

⚠️ 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.

@developingjames: 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.

@LukasTy LukasTy added duplicate This issue or pull request already exists component: DateTimePicker The React component. component: TimePicker The React component. and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 2, 2024
@LukasTy LukasTy changed the title AM/PM Behavior in the Calendar control [pickers] AM/PM Behavior in the Calendar control Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: DateTimePicker The React component. component: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component. duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants