diff --git a/components/time-picker/demo/basic.md b/components/time-picker/demo/basic.md index 5444e7e838..c58ed5a02a 100644 --- a/components/time-picker/demo/basic.md +++ b/components/time-picker/demo/basic.md @@ -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( diff --git a/components/time-picker/demo/value.md b/components/time-picker/demo/value.md index a8a21d5ab5..a96f5c0def 100644 --- a/components/time-picker/demo/value.md +++ b/components/time-picker/demo/value.md @@ -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 ;