|
|
@ -16,12 +16,8 @@ const Test = React.createClass({ |
|
|
|
}; |
|
|
|
}, |
|
|
|
onChange(time) { |
|
|
|
const parsedTime = time && time.toLocaleTimeString('zh-CN', { |
|
|
|
hour12: false |
|
|
|
}); |
|
|
|
console.log(time, parsedTime); |
|
|
|
this.setState({ value: parsedTime }); |
|
|
|
// or this.setState({ value: time }); |
|
|
|
console.log(time); |
|
|
|
this.setState({ value: time }); |
|
|
|
}, |
|
|
|
render() { |
|
|
|
return <TimePicker value={this.state.value} onChange={this.onChange} />; |
|
|
|