mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

StaticDateTimePicker AM/PM buttons display outside container

Open tomvrampio opened this issue 4 years ago • 3 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

AM/PM buttons display outside container, positioned bottom left/right of the page, like little FABs.

Expected behavior 🤔

AM/PM buttons to be inside the card, just underneath the clock. Or in the clock, if prop 'ampmInClock' is true - but this just moves them up slightly.

Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/staticdatetimepickerampm-xdz8fu?file=/demo.js

This is forked from the demo in the docs

Context 🔦

Content of the card needs to be inside the card, or a user isn't going to see it as related.

Your environment 🌎

npx @mui/envinfo
Windows 11, Chrome

Order ID 💳 (optional)

49717

tomvrampio avatar Sep 30 '22 09:09 tomvrampio

Sounds related to #4947

The time we fix the bug, you can use the following code to fix in in your codebase

sx={{
  "& .MuiClock-root ": { position: "relative" },
  "& .MuiClock-pmButton": {
    bottom: 0,
    right: 0
  },
  "& .MuiClock-amButton": { bottom: 0, left: 0 }
}}

alexfauquette avatar Sep 30 '22 11:09 alexfauquette

Thanks for the workaround, and apologies that I didn't find that other issue

tomvrampio avatar Oct 03 '22 13:10 tomvrampio

No problem I'm closing this issue to avoid duplication

alexfauquette avatar Oct 03 '22 15:10 alexfauquette