📜  如何在 reactjs 中存储日期表单字段中的多个日期 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:57.944000             🧑  作者: Mango

代码示例1
handleChange = (e, date) => {
    const value = moment(date);
    const chargeId = e.target.name;
    console.log(chargeId);
    this.setState({[chargeId]: value}, () => console.log(this.state[chargeId]));
}