2015-11-24 17:25:32 +08:00
|
|
|
# 日期时间选择
|
2015-05-29 21:07:46 +08:00
|
|
|
|
|
|
|
- order: 4
|
2015-06-02 17:20:02 +08:00
|
|
|
|
2015-12-25 01:21:03 +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) {
|
2015-11-26 22:18:14 +08:00
|
|
|
console.log('选择了时间:', value);
|
2015-11-24 17:25:32 +08:00
|
|
|
}
|
|
|
|
|
2015-12-25 01:21:03 +08:00
|
|
|
ReactDOM.render(
|
|
|
|
<DatePicker showTime format="yyyy-MM-dd HH:mm:ss" onChange={onChange} style={{width: 160}} />
|
2015-12-29 12:08:58 +08:00
|
|
|
, mountNode);
|
2015-05-29 21:07:46 +08:00
|
|
|
````
|