日期选择器的用户界面react-datetime无法正常显示?

时间:2018-07-09 15:47:10

标签: javascript reactjs bootstrap-4 material-ui datetimepicker

<Datetime dateFormat={false} className="form-control" onChange={this.handleChange.bind(this)}/>

我正在使用react-datetime作为时间选择器

 handleChange(newtime){
            this.setState({MTtime: moment(newtime).format("hh:mm:ss a")});
        }

enter image description here

用户界面显示不正确

1 个答案:

答案 0 :(得分:0)

react-bootstrap-datetimepicker已过时,您应将其卸载并使用react-datetime

要将时间戳转换为日期,请查看this answer