每当我@material-ui/pickers
尝试从选择器更改日期和时间时,我都会遇到Formik
错误React Class Component
TypeError : Cannot read property 'type' of undefined
下面是我的代码
// Handle fields change
handleChange = input => e => {
this.props.formikHandleChange(e);
this.setState({ [input]: e.target.value });
};
<MuiPickersUtilsProvider utils={MomentUtils}>
<DateTimePicker
label="Creation Date"
name={creationDate}
onChange={handleChange('creationDate')}
value={values.creationDate}
onBlur={formikHandleBlur}
/>
</MuiPickersUtilsProvider>