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] Add verification to disable skipped hours in spring forward DST #15115

Conversation

arthurbalduini
Copy link
Member

@arthurbalduini arthurbalduini commented Oct 25, 2024

(expects to) close #12403

This is an approach to prevent current inconsistency when selecting a value that is skipped on spring forward DST event.

Although it's debatable, perhaps hidding the value could make sense, but this wouldn't be a good UX for TimeClock. I'm verifying when the adapter doesn't return the same hour as the one of the option.

Before

Screen.Recording.2024-10-25.at.14.47.45.mov

After

Screen.Recording.2024-10-25.at.14.49.10.mov

Missing

  • Issue with TimeClock not rendering disabled hour in first render
Screen.Recording.2024-10-25.at.14.51.34.mov
  • Tests

@arthurbalduini arthurbalduini added component: pickers This is the name of the generic UI component, not the React module! time-zone Issues about time zone management labels Oct 25, 2024
@mui-bot
Copy link

mui-bot commented Oct 25, 2024

Deploy preview: https://deploy-preview-15115--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 5b5544a

@LukasTy
Copy link
Member

LukasTy commented Nov 13, 2024

Great idea, this looks like an interesting compromise. 👍
I fear this could raise questions to end users and developers alike if a specific hour is disabled without any explanation. 🙈
However, I'm not against trying this out without any extra tooltips or something similar as it would bring these components closer to the DigitalClock in behavior parity. 🤔
WDYT about the proposal @flaviendelangle?

@flaviendelangle
Copy link
Member

If I understand correctly, this disabled hour only occur in spring when entering DST.
If so, I'm fine with the solution, if it can prevent some weird scenario it seems like a nice compromise

@flaviendelangle flaviendelangle changed the title [pickers] add verification to disable skipped hours in spring forward DST [pickers] Add verification to disable skipped hours in spring forward DST Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! time-zone Issues about time zone management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pickers][DateTimePicker] not showing 2 in the hour category, but shows 3 twice and the first isn't selectable
4 participants