Using react datetime out-of-the-box. It's rendering perfectly and passing data just fine.
The problem is that while I am able to choose a date, the time input is not working properly.
As you know it's an arrow up/down input for changing hour, minutes or am/pm. PROBLEM is that the values revert to default '12:00 AM' the instant I try to change them.
Some code:
<Datetime type="text" className="form-control" id="meeting-name" placeholder="Meeting Time & Date" name="meetingTimestamp" value={this.state.meetingTimestamp} onChange={this.onPickDateTime} />
onPickDateTime(moment) {
let time = moment.format("YYYY-MM-DD HH:mm:ss");
this.setState({
meetingTimestamp: time,
})
}
I am also referencing the doc's-recommended styling.
Any clues??