Material-ui-pickers: [Help needed] Font size

Created on 11 Mar 2018  路  5Comments  路  Source: mui-org/material-ui-pickers

Environment

| Tech | Version |
|---------------------|---------|
| material-ui-pickers | ^1.0.0-rc.2 |
| material-ui | ^1.0.0-beta.36 |
| React | ^16.2.0 |

Hi, I'm having issue with font size for both the text in DateTimePicker & Input. Both of the font size are too small and I'm unable to find a way to adjust them (show in photo below).

Font size for text in calendar is too small

screen shot 2018-03-11 at 10 38 44 pm

Font size for value is too small

screen shot 2018-03-11 at 10 38 49 pm

I understand that they are labelClassName and helperTextClassName but I can't seem to change the style for text in calendar and input value. Any feedback or advice is highly appreciated! Thanks in advance :D

docs question

Most helpful comment

I had the same problem because i use:

html {
  font-size: 62.5%; /* 62.5% of 16px = 10px */
}

I solved with this (as shown in material ui documentation):

const theme = createMuiTheme({
  typography: {
    // ...
    // Tell Material-UI what's the font-size on the html element is.
    htmlFontSize: 10,
    // ...
  },
});

All 5 comments

@darylong Please provide sandbox and try to reproduce it. We are actually depends on material-ui theme, but they are using em and rem so I can advice you check the font-size of <html> tag.

@darylong https://material-ui-pickers.dev/guides/css-overrides is an example of how to change styling of any pickers control

I had the same problem because i use:

html {
  font-size: 62.5%; /* 62.5% of 16px = 10px */
}

I solved with this (as shown in material ui documentation):

const theme = createMuiTheme({
  typography: {
    // ...
    // Tell Material-UI what's the font-size on the html element is.
    htmlFontSize: 10,
    // ...
  },
});

It is already fixed in v3

@darylong here is an example of how to change styling of any pickers control

link not found. Please share it again

Was this page helpful?
0 / 5 - 0 ratings

Related issues

charlax picture charlax  路  3Comments

killjoy2013 picture killjoy2013  路  3Comments

danmce picture danmce  路  3Comments

aditya81070 picture aditya81070  路  3Comments

danmce picture danmce  路  3Comments