-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 DateTimeRangePicker
component
#9528
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-9528--material-ui-x.netlify.app/ Updated pages: |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This looks like a great start 👍 I have added more benchmarks in 🚤 Date Time Range Picker component for this component. To comment on https://app.slack.com/client/TS83SPSTV/C055FMZKB28/thread/C055FMZKB28-1689256302.407199?cdn_fallback=2, I have noticed this:
Screen.Recording.2023-07-13.at.21.55.59.mov
I feel that is a better use of space, or honestly blank might be even better:
Maybe there is a way to communicate this as well. |
@oliviertassinari Thank you for the feedback! 🙏
We've added those as an option to toggle between selecting start or end time selection. AntD does not seem to provide an option to do it via UI, only the inputs. 🤷
Don't we? Or am I missing something? 🤔 Could you pint point or clarify what are you actually referring to? 🤔 |
When only looking at the popup's content, you can't determine if you are on the start or the end of the range. You have to look a bit up to check the input focus style. |
By clue, do you mean the fact, that they disable the days before the range start if the end input is focused? 🤔 |
docs/translations/api-docs/date-pickers/pickers-text-field.json
Outdated
Show resolved
Hide resolved
packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.tsx
Outdated
Show resolved
Hide resolved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Requesting a final re-review from @flaviendelangle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for all the work around this topic ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great 👍
packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePickerTabs.tsx
Show resolved
Hide resolved
Great to see this being merged. Half a year of solid effort 🚀 Thank you @LukasTy! |
👍🏻 Thank you for your effort! |
Signed-off-by: Lukas <[email protected]> Co-authored-by: Flavien DELANGLE <[email protected]>
Fixes #4547
Preview: https://deploy-preview-9528--material-ui-x.netlify.app/x/react-date-pickers/date-time-range-picker/
This will be release as stable in MUI X v7
Note
The PR is too big as it is, I'll either wait with the changes on
validation
andfind your component
pages or maybe keep those for a separate PR. 🤔The current implementation uses
rendererInterceptor
idea, which renders a 2-column layout on the desktop and wraps the providedtimeViewRenderer
so that the existing renderers can be re-used and would work with a[start, end]
value.Pros of this approach
timeViewRenderers
;dateTimeRangeViewRenderers
are created;Cons of this approach
Example of how to change specific view rendering
https://deploy-preview-9528--material-ui-x.netlify.app/x/react-date-pickers/date-time-range-picker/#change-view-renderer
Middleground
We can decide to reuse the same logic as with
DesktopDateTimePicker
and just create adateTimeRangeViewRenderers
and "call it a day". 🤔TODO
themeAugmentation
and spec testValidation
pageChangelog
🚀 Release the Date Time Range Picker component ([pickers] Add
DateTimeRangePicker
component #9528) @LukasTy