You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design/components/datepicker/index.md

37 lines
1.1 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Datepicker
- category: Components
- chinese: 日期选择框
- type: 表单
---
输入或选择日期/时间的控件。
## 何时使用
当用户需要输入一个日期/时间,可以点击标准输入框,弹出日期面板进行选择。支持键盘操作。
## API
```html
<Datepicker value="2015-01-01" />
```
| 参数 | 说明 | 类型 | 默认值 |
|--------------|----------------|----------|--------------|
| value | 日期 | string | 无 |
| defaultValue | 默认日期 | string | 无 |
| format | 展示的日期格式 | string | "yyyy-MM-dd" |
| disabledDate | 不可选择的日期 | function | 无 |
| onSelect | 选择日期的回调 | function | 无 |
| showTime | 显示时间选择条 | boolean | false |
| disabled | 禁用 | bool | false |
| size | 输入框大小,`large`代表高为32px`small`代表高为22px默认28px | string | 无 |
<style>
.code-box-demo .ant-calendar-picker {
margin: 0 12px 12px 0;
}
</style>