You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# Datepicker
|
|
|
|
|
|
|
|
- category: Components
|
|
|
|
- chinese: 日期选择框
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
点击标准输入框,弹出日期选择面板,选择日期和时间,支持键盘操作。
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
<Datepicker value="2015-01-01" />
|
|
|
|
```
|
|
|
|
|
|
|
|
## API
|
|
|
|
|
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
|
|
|----------|----------------|----------|--------------|
|
|
|
|
| value | 日期 | string | 无 |
|
|
|
|
| format | 展示的日期格式 | string | "yyyy-MM-dd" |
|
|
|
|
| disabled | 不可选择的日期 | function | 无 |
|
|
|
|
| onSelect | 选择日期的回调 | function | 无 |
|
|
|
|
| showTime | 显示时间选择条 | boolean | false |
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.code-box-demo .rc-calendar-picker-input {
|
|
|
|
width: 200px;
|
|
|
|
}
|
|
|
|
</style>
|