[pickers] Add TimeRangePicker component#9431
Conversation
Localization writing tips ✍️Seems you are updating localization 🌍 files. Thank you for contributing to the localization! 🎉 To make your PR perfect, here is a list of elements to check: ✔️
Deploy preview: https://deploy-preview-9431--material-ui-x.netlify.app/ Updated pages: |
LukasTy
left a comment
There was a problem hiding this comment.
Leaving some minor observations here. 🙈
|
|
||
| const props = { | ||
| ...defaultizedProps, | ||
| // TODO: Do we want the toolbar to support AM/PM switch on mobile? |
There was a problem hiding this comment.
Probably no, unless we go with the AnalogClock on Mobile. 🤔
There was a problem hiding this comment.
So the plan is to have the digital clock on mobile for range pickers and the analog clock on mobile for TimePicker / DateTimePicker ?
There was a problem hiding this comment.
If we'd go with the proposed designs - it would seem so, but that is still up for debate. 🙈
There was a problem hiding this comment.
Is the component ready for mobile?
I'm 100% in favor of doing it. But if we do it, for me it means that in the future we will use the digital clock on the MobileTimePicker.
There was a problem hiding this comment.
Is the component ready for mobile?
It had some issues, which I tried addressing in the DateTimeRangePicker PR.
I'm 100% in favor of doing it. But if we do it, for me it means that in the future we will use the digital clock on the
MobileTimePicker.
That part we still need to align on the Design and Product side. I'm also for consistency, but we currently do not seem to have a singular position that everyone agrees on. 🙈
There was a problem hiding this comment.
I think we can focus our next Monday meeting on this topic 👌
Concerning the rendererInterceptor, it's not easy to understand what is the goal but I'll wait to have the JSDoc to have a 2nd look 👍
There was a problem hiding this comment.
I think we can focus our next Monday meeting on this topic 👌
Oh yes, that's one of the last pressing design matters for the range pickers.
Concerning the
rendererInterceptor, it's not easy to understand what is the goal but I'll wait to have the JSDoc to have a 2nd look 👍
Don't pay too much attention to it. That was my alpha implementation for configurable view renderer support and handling view combination (DateRangeCalendar on the left and MultiSectionDigitalClock or any other timeViewRenderer on the right).
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Great effort! 🚀 💙 Nice to see this component shaping up 💪 It's a bit hard to tell the difference between the start time picker and the end time picker. I'm can't remember exactly if we said we would implement the highlighting in a follow-up 🤔 I think we should consider implementing the highlighting design at least partially to make the switch between start and end pickers more visible. The picker that opens depends on the value you filled out last. i.e. You fill out start time, fill out end time but don't click 'ok' or select the meridiem, the next time you open the picker, it opens on the end time and you can't select the start value unless you interact with the end value again. It can become a bit confusing for the user. This is sort of related to my comment from above: if there is a clear visual distinction the opening behavior might not be such a problem. I propose we standardize the opening behavior though... WDYT about this: clicking the open picker button always opens the start time? 🤔 Still not perfect, but maybe less confusing? There's a bit of a layout shift between the start and end time pickers due to the difference of width. Would making the start and end pickers width equal be a big hassle? 🤔 Would it be possible to position the picker under its input when using multi input fields? |
Thank you for the feedback @noraleonte. 🙏
I completely agree that the current process is not great.
The views or range position management has not been altered in the PR.
Yes, it will be done. It's also planned for a follow-up. 😉
Are you suggesting adding a minWidth on that demo? 🤔 |
Ooh, I completely missed that, sorry 🙈
True, 100% agree 🤔 Highlighting will certainly help. We can treat this as a separate UX issue since it also impacts the other pickers. TRP might be in a bit of a special situation because you don't have a visual indicator of the range inside the view. For the date range you have the range highlighting so it's less confusing.
Nice, thanks 😄
Awesome 🎉 |
|
I cannot approve 😢 |
noraleonte
left a comment
There was a problem hiding this comment.
Thanks for pushing this forward 🚀 great work 💙
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |

Doc preview
Closes #4460
Follow ups:
triggerRefdynamic when used withMultiInputTimeRangeField[TimeRangePicker] Shift popper between start and end input on multi input field #16920TimeRangePickeroption in various docs related places (i.e. validation, component exploration) [docs] AddTimeRangePickerto relevant validation demos #16919