2016-03-31 09:40:55 +08:00
---
order: 4
2016-07-15 16:20:23 +08:00
title:
2016-06-19 11:17:09 +08:00
zh-CN: 日期时间选择
en-US: To choose time
2016-03-31 09:40:55 +08:00
---
2015-06-02 17:20:02 +08:00
2016-06-19 11:17:09 +08:00
## zh-CN
2016-04-15 23:54:47 +08:00
增加选择时间功能,当 `showTime` 为一个对象时,其属性会传递给内建的 `TimePicker` 。
2015-05-29 21:07:46 +08:00
2016-06-19 11:17:09 +08:00
## en-US
2016-09-09 13:55:21 +08:00
This property provide an additional time selection. When `showTime` is an Object, its properties will be passed on to `TimePicker` , which is a built-in function.
2016-06-19 11:17:09 +08:00
2015-05-29 21:07:46 +08:00
````jsx
2015-12-25 01:21:03 +08:00
import { DatePicker } from 'antd';
2015-05-29 21:07:46 +08:00
2015-12-25 01:21:03 +08:00
function onChange(value) {
2016-09-29 14:35:33 +08:00
console.log('Selected Time: ', value);
2015-11-24 17:25:32 +08:00
}
2015-12-25 01:21:03 +08:00
ReactDOM.render(
2016-09-29 14:35:33 +08:00
< DatePicker showTime format = "YYYY-MM-DD HH:mm:ss" placeholder = "Select Time" onChange = {onChange} / >
2015-12-29 12:08:58 +08:00
, mountNode);
2015-05-29 21:07:46 +08:00
````