fix time-picker demo error in safari

This commit is contained in:
afc163 2016-01-26 15:04:13 +08:00
parent cf077230d7
commit d064e122b3
2 changed files with 3 additions and 9 deletions

View File

@ -10,9 +10,7 @@
import { TimePicker } from 'antd';
function onChange(time) {
if (time) {
console.log(time.toLocaleTimeString('zh-CN', { hour12: false }));
}
console.log(time);
}
ReactDOM.render(

View File

@ -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} />;