score:0

this.state={
    datetime: `${new Date().getFullYear()}-${`${new Date().getMonth()+1}`.padStart(2,0)}-${`${new Date().getDate()}`.padStart(2,0)}T${`${new Date().getHours()}`.padStart(2,0)}:${`${new Date().getMinutes()}`.padStart(2, 0)}`
}

score:1

{"timestamp":"2018-03-16T15:45:36.000Z"}

score:1

 <input 
   type="datetime-local" 
   name="datetime" 
   value={this.state.datetime} 
   onChange={e => this.setState({datetime: e.target.value})}
  />

Related Query

More Query from same tag