Can't style datepiker popup dialog

元气小坏坏 提交于 2019-12-29 07:52:18

问题


I have a problem with customizing the datepicker popup dialog(For example change color of header). I can't style it by attribute style like textField by textFieldStyle. It doesn't have any class or id.

How can I do it?


回答1:


The only place you can currently override this is the theme:

import React from 'react';
import {cyan500} from 'material-ui/styles/colors';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MyAppRoot from './MyAppRoot';

const muiTheme = getMuiTheme({
  datePicker: {
    selectColor: cyan500,
  },
});

class Main extends React.Component {
  render() {
    return (
      <MuiThemeProvider muiTheme={muiTheme}>
        <MyAppRoot />
      </MuiThemeProvider>
    );
  }
}

export default Main;


来源:https://stackoverflow.com/questions/37400648/cant-style-datepiker-popup-dialog

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!