mui/material-ui

[DatePicker] Can't resize to fit smaller devices

Closed this issue · 1 comments

Problem description

The minWidth and minHeight seem to hard coded and are to big for smaller devices, such as iPhone 4.

Steps to reproduce

I tried the following styling but this seems to have no effect:

{ window.innerHeight > 480 ? 
      ( <DatePicker
             hintText={config.date.day.hintText}
             textFieldStyle={styles.width}
             onChange={this.handleDateChange}
             mode="portrait"
      /> ) :
      ( <DatePicker
             hintText={config.date.day.hintText}
             textFieldStyle={styles.width}
             onChange={this.handleDateChange}
             style={{dialogContent: {width: window.innerWidth - 20}, dialogBodyContent: {minHeight: window.innerHeight - 40, minWidth: window.innerWidth - 20}}}
                        mode="portrait"
      /> )
 }

Versions

  • Material-UI: 0.15.4
  • React: 15.3.1
  • Browser:

Image

img_0024

Closing for #4787