DatePicker 日期选择
使用场景#
输入或选择日期的控件。当用户需要输入一个日期,可以点击标准输入框,弹出日期面板进行选择。
示例#
基本示例#
-
inline
带时间#
-
inline
设置默认展示日期#
inline
自定义禁用日期#
inline
API#
DatePicker#
| 字段 | 描述 |
|---|---|
| placeholder | string输入框提示文本 |
| value | string受控的日期值 |
| defaultValue | string默认选中的日期值 |
| onChange | FormControlOnChangeHandler<string>选中日期值改变时的回调 |
| status | string |
| hasTime | boolean是否有时间 |
| timeProps | TimePanelProps传递给时间面板的属性集 |
| format | string日期格式 |
| popupProps | any传递给弹层的属性集 |
| getDisabledDate | CheckDateFn设置禁用日期 |
| getDefaultVisibleMonth | any设置默认显示的月份 |
| className | string |
| style | CSSProperties |
DateRangePicker#
| 字段 | 描述 |
|---|---|
| placeholder | string[]输入框提示文本 |
| value | string[] |
| defaultValue | string[] |
| onChange | FormControlOnChangeHandler<string[]> |
| hasTime | boolean是否有时间 |
| timeProps | TimePanelProps传递给时间面板的属性集 |
| format | string日期格式 |
| popupProps | any传递给弹层的属性集 |
| getDisabledDate | CheckDateFn设置禁用日期 |
| getDefaultVisibleMonth | any设置默认显示的月份 |
| className | string |
| style | CSSProperties |
