所以我在浏览器中运行此代码时出现问题。它没有例外..
import React from 'react'
import DatePicker from 'material-ui/DatePicker';
const Datetime = () => {
return (
<div>
<DatePicker hintText="start datetime" />
</div>
)
}
export default Datetime;
当我点击它时,它似乎不会触发事件处理程序。所以我需要调用injectTapEventPlugin()来使材料ui事件起作用?
答案 0 :(得分:0)
您需要执行以下操作:
import React from 'react';
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
import DatePicker from 'material-ui/DatePicker';