mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-19 03:54:28 +08:00
20 lines
318 B
Markdown
20 lines
318 B
Markdown
# 日期时间选择
|
|
|
|
- order: 4
|
|
|
|
增加选择时间功能。
|
|
|
|
---
|
|
|
|
````jsx
|
|
import { DatePicker } from 'antd';
|
|
|
|
function onChange(value) {
|
|
console.log('选择了时间:', value);
|
|
}
|
|
|
|
ReactDOM.render(
|
|
<DatePicker showTime format="yyyy-MM-dd HH:mm:ss" onChange={onChange} style={{ width: 160 }} />
|
|
, mountNode);
|
|
````
|