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][TimePicker] maxTime doesn't work properly if picker value and maxTime have different dates but same time #16098

Closed
kcsujeet opened this issue Jan 7, 2025 · 3 comments
Labels
component: pickers This is the name of the generic UI component, not the React module! status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it

Comments

@kcsujeet
Copy link

kcsujeet commented Jan 7, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/p/sandbox/interesting-dust-39y6rn
  2. Click on end time picker.
  3. See that all the time values are disabled even though all time values of 2022-04-17 are smaller than time values of 2022-04-18
Screenshot 2025-01-07 at 6 33 44 PM

Current behavior

Valid time values are disabled.

Expected behavior

Valid time values should be enabled and selectable.

Context

No response

Your environment

No response

Search keywords: timepicker maxTime

@kcsujeet kcsujeet added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 7, 2025
@github-actions github-actions bot added the component: pickers This is the name of the generic UI component, not the React module! label Jan 7, 2025
@LukasTy
Copy link
Member

LukasTy commented Jan 8, 2025

Hello, @kcsujeet.
This is the expected default behavior of the prop.
It is mentioned on the validation page:
Screenshot 2025-01-08 at 11 15 48

Have you tried using the shouldDisableTime callback instead?
Or, the disableIgnoringDatePartForTimeValidation prop would also help in this case. 🤔

@LukasTy LukasTy added status: waiting for author Issue with insufficient information status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it and removed bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 8, 2025
@LukasTy LukasTy changed the title Timepicker maxTime doesn't work properly if picker value and maxTime have different dates but same time [pickers][TimePicker] maxTime doesn't work properly if picker value and maxTime have different dates but same time Jan 8, 2025
@kcsujeet
Copy link
Author

kcsujeet commented Jan 8, 2025

Hi @LukasTy ... Thank you for the reply. disableIgnoringDatePartForTimeValidation worked perfectly. I'll close the issue.

Thank you again. : )

@kcsujeet kcsujeet closed this as completed Jan 8, 2025
@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

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.

Note

@kcsujeet 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.

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 8, 2025
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! status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it
Projects
None yet
Development

No branches or pull requests

2 participants