mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
fix time-picker demo error in safari
This commit is contained in:
parent
cf077230d7
commit
d064e122b3
@ -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(
|
||||
|
@ -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} />;
|
||||
|
Loading…
Reference in New Issue
Block a user