【发布时间】:2017-02-08 09:48:14
【问题描述】:
我在我的 ReactJS 项目中使用来自 http://www.material-ui.com/#/components/date-picker 的 <DatePicker/>,并且希望居中对齐占位符和输入文本。所以我尝试了 textAlign:'center' 到 textFieldStyle 和常规的 style 属性,但仍然没有工作。
有没有办法实现居中对齐?
谢谢
编辑
//So inside tried style={{textAlign: 'center'}} and textFieldStyle={{textAlign: 'center}} but neither worked
<DatePicker hintText="Choose Date" container="inline" />
【问题讨论】:
-
你能分享你的代码吗?
标签: javascript css reactjs datepicker