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

Migrate material date- and time pickers from mui/lab to mui/x-date-pickers #2002

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

lucas-koehler
Copy link
Contributor

@lucas-koehler lucas-koehler commented Aug 18, 2022

Date pickers failed with recent versions of @mui/lab.
Furthermore, they have officially been moved to @mui/x-date-pickers.
See https://mui.com/blog/lab-date-pickers-to-mui-x/

  • Add @mui/x-date-picker peer and dev dependency to the material renderer package
  • Remove @mui/lab peer and dev dependency from the material renderer package.
    It was only used for the date and time pickers
  • Adapt two unit tests to actually use valid inputs.
  • Adapt date and time picker action configuration to new API.
    • Keep the clear button on mobile devices
    • No action buttons on desktop devices (as before)
    • Action button labels (for mobile devices) can no longer be configured via ui schema option due to missing API

Fix #1998

UI differences for mobile devices

Notable differences:

  • clear button are no longer left aligned
  • button texts are no longer adaptable. This might be addable again in a follow up by providing a custom toolbar. See here as a starting point.

Now

image
image
image

Before

image
image
image

…ckers

Date pickers failed with recent versions of @mui/lab.
Furthermore, they have officially been moved to @mui/x-date-pickers.
See https://mui.com/blog/lab-date-pickers-to-mui-x/

* Add @mui/x-date-picker peer and dev dependency to the material renderer package
* Remove @mui/lab peer and dev dependency from the material renderer package.
  It was only used for the date and time pickers
* Adapt two unit tests to actually use valid inputs.
* Adapt date and time picker action configuration to new API.
  * Keep the clear button on mobile devices
  * No action buttons on desktop devices (as before)
  * Action button labels (for mobile devices) can no longer be configured via ui schema option due to missing API

Fix eclipsesource#1998
@coveralls
Copy link

Coverage Status

Coverage remained the same at 84.356% when pulling 67d612c on lucas-koehler:1998-date-pickers into 0f0470f on eclipsesource:master.

@sdirix sdirix merged commit 73142a3 into eclipsesource:master Aug 19, 2022
@lucas-koehler lucas-koehler deleted the 1998-date-pickers branch August 22, 2022 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date pickers not rendered with "3.0.0-rc.0"
3 participants