-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[DatePicker] Remove dead dom node #24162
Labels
component: date picker
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@damir-sirola Do you have a reproduction? I can't observe the issue. We can't help without. |
It seems that we can lighten the rendering of the day component: diff --git a/packages/material-ui-lab/src/PickersDay/PickersDay.tsx b/packages/material-ui-lab/src/PickersDay/PickersDay.tsx
index e74ef05239..271e2563e8 100644
--- a/packages/material-ui-lab/src/PickersDay/PickersDay.tsx
+++ b/packages/material-ui-lab/src/PickersDay/PickersDay.tsx
@@ -62,9 +62,6 @@ export const styles = (theme: Theme) =>
border: `1px solid ${theme.palette.text.secondary}`,
},
},
- dayLabel: {
- // need for overrides
- },
selected: {},
disabled: {},
});
@@ -236,7 +233,7 @@ const PickersDay = React.forwardRef(function PickersDay<TDate>(
onClick={handleClick}
{...other}
>
- <span className={classes.dayLabel}>{utils.format(day, 'dayOfMonth')}</span>
+ {utils.format(day, 'dayOfMonth')}
</ButtonBase>
);
}); It will also help with mui/mui-x#4602. Does anyone want to work on it? :) |
This comment has been minimized.
This comment has been minimized.
I've started to work on this issue :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component: date picker
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
Unable to modify styling on
MuiPickersDay
because theTypography
styling overrides itEnvironment
Steps to reproduce
Typography
body2MuiPickersDay
For example
Expected behavior
I expect styling defined in
MuiPickersDay
override to be appliedActual behavior
Styles specified in
Typography
are applied because they're stronger thanMuiPickersDay.day
Live example
The text was updated successfully, but these errors were encountered: