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

[picker] Disable am/pm for maxTime/minTime, disableTime, and disableFuture props #15999

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

A-s-h-o-k
Copy link

@A-s-h-o-k A-s-h-o-k commented Dec 25, 2024

@A-s-h-o-k
Copy link
Author

Hi @flaviendelangle @zannager @LukasTy Could you please review my PR when you have time? I’d love your feedback.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 30, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@flaviendelangle
Copy link
Member

Thanks for your contribution
I'm currently removing the props passed to all the slots like the toolbar and instead rely on context to help the picker forward information to them.
I plan to add a new context to forward the validation props, I think we need to wait for it before solving this issue 👍

@zannager zannager added the component: pickers This is the name of the generic UI component, not the React module! label Dec 30, 2024
@LukasTy LukasTy added the enhancement This is not a bug, nor a new feature label Dec 30, 2024
@LukasTy
Copy link
Member

LukasTy commented Dec 30, 2024

I plan to add a new context to forward the validation props, I think we need to wait for it before solving this issue 👍

Do you think it is worth fixing this issue on v7 with a solution similar to what is proposed in this PR? 🤔

@flaviendelangle
Copy link
Member

Do you think it is worth fixing this issue on v7 with a solution similar to what is proposed in this PR?

Fixing by adding props then removing then (so a BC), not sure if it the right move

@A-s-h-o-k
Copy link
Author

That's a good point about the BC break. Adding props temporarily could solve the issue quickly, but it might not be the best move if the props are removed later.

If the context-based solution will be ready soon, it might make sense to hold off and go straight to that approach to ensure consistency. However, if addressing the issue now is a priority, we could consider adding the props with clear documentation about their temporary nature.

Happy to hear your thoughts and adjust based on the preferred direction! 👍

@LukasTy
Copy link
Member

LukasTy commented Dec 31, 2024

The context-based solution should be available relatively shortly (within 1-2 months). 😉
Just noting that it will only be available on v8, which is currently in the pre-release phase.

@A-s-h-o-k
Copy link
Author

Thanks for the update! Given that the context-based solution is coming soon in v8, what do you think our next steps should be for addressing this issue in v7?
Should we proceed with a temporary fix, or focus entirely on the v8 implementation?

@flaviendelangle
Copy link
Member

flaviendelangle commented Dec 31, 2024

Unless we have a big traction to fix this issue in v7, I would focus solely on the v8 implementation (and make it as good as possible).
If we want to fix it in v7, I would introduce a small context on the time pickers that manually passes those props and consume it in the time picker toolbar. It would not allow custom toolbar to have this behavior but I think it's a decent trade-off.

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! enhancement This is not a bug, nor a new feature PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants