This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
105 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## 日期选择器 | ||
|
||
### 基本用法 | ||
|
||
```html | ||
<div :controller="test"> | ||
<ms-datepicker :widget="{ | ||
placeholder:'请选择入学时间' | ||
}"></ms-datepicker> | ||
</div> | ||
``` | ||
|
||
### 格式化日期 | ||
|
||
```html | ||
<div :controller="test"> | ||
<ms-datepicker :widget="{ | ||
placeholder:'请选择入学时间', | ||
format:'YYYY/MM/DD' | ||
}"></ms-datepicker> | ||
</div> | ||
``` | ||
|
||
### 不可选择的日期 | ||
|
||
```html | ||
<div :controller="test"> | ||
<ms-datepicker :widget="{ | ||
placeholder:'请选择入学时间', | ||
startDate:'2017/5/26', | ||
endDate:'2018/7/26' | ||
}"></ms-datepicker> | ||
</div> | ||
``` | ||
|
||
### 日期时间选择 | ||
|
||
```html | ||
<div :controller="test"> | ||
<ms-datepicker :widget="{ | ||
placeholder:'请选择抢购开始时间', | ||
showTime: true | ||
}"></ms-datepicker> | ||
</div> | ||
``` | ||
|
||
### 组件参数 | ||
|
||
| 参数 | 说明 | 类型 | 默认值 | | ||
|-----|-----|-----|-----| | ||
| format | 日期格式,参考 momentjs | string | `'YYYY-MM-DD'` | | ||
| startDate | 控制可以选择的日期范围的开始日期 | string | '' | | ||
| endDate | 控制可以选择的日期范围的结束日期 | string | '' | | ||
| disabledDate | 不可选择日期的判断函数,传入 current(当前遍历日期的毫秒值),返回 true 表示此日期不可选 | function(current:number) | `() => false` | | ||
| showTime | 是否需要选择时间,如果此项为 true,则 format 默认为 YYYY-MM-DD HH:mm:ss | boolean | false | | ||
|
||
> 继承 [ms-control 组件](#!/form-control) 的所有参数 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## 时间选择器 | ||
|
||
### 基本用法 | ||
|
||
```html | ||
<div :controller="test"> | ||
<ms-timepicker :widget="{ | ||
placeholder:'请选择打卡时间' | ||
}"></ms-timepicker> | ||
</div> | ||
``` | ||
|
||
### 格式化时间 | ||
|
||
```html | ||
<div :controller="test"> | ||
<ms-timepicker :widget="{ | ||
placeholder:'请选择打卡时间', | ||
format:'HH:mm' | ||
}"></ms-timepicker> | ||
</div> | ||
``` | ||
|
||
### 组件参数 | ||
|
||
| 参数 | 说明 | 类型 | 默认值 | | ||
|-----|-----|-----|-----| | ||
| format | 日期格式,参考 momentjs | string | `'HH:mm:ss'` | | ||
|
||
> 继承 [ms-control 组件](#!/form-control) 的所有参数 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters