2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-07 16:52:27 +03:00

docs: add the donate

This commit is contained in:
mengxiong10
2019-05-13 16:25:52 +08:00
parent c6a6300a5c
commit 559e83dde6
2 changed files with 33 additions and 21 deletions
+13 -7
View File
@@ -85,7 +85,7 @@ export default {
|------|--------------|-------|---------|
| type | select date type | 'date' \| 'datetime' \| 'year' \| 'month' \| 'time' | 'date' |
| range | if true, the type is daterange or datetimerange | `boolean` | false |
| format | format the Date. The parsing tokens are similar to the moment.js | [token](https://github.com/taylorhakes/fecha#formatting-tokens) \| [`object`](https://github.com/mengxiong10/vue2-datepicker/issues/232#issuecomment-458558141) | 'YYYY-MM-DD' |
| format | format the Date. The parsing tokens are similar to the moment.js | [token](https://github.com/taylorhakes/fecha#formatting-tokens) \| [`object`](https://github.com/mengxiong10/vue2-datepicker/issues/232#issuecomment-458558141) | 'YYYY-MM-DD' |
| value-type | type of binding value. If not specified, the binding value will be a Date object | [value-type](#value-type) | 'date' |
| lang | Translation | [lang](#lang) | 'zh' |
| clearable | if false, don't show the clear icon | `boolean` | true |
@@ -101,7 +101,7 @@ export default {
| not-after | Disable all dates after new Date(not-after) | `string`\|`Date`| '' |
| disabled-days | Disable Days | `(date) => boolean` | - |
| shortcuts | the shortcuts for the range picker | [shortcuts](#shortcuts) | true |
| time-picker-options | custom time-picker | [time-picker-options](#time-picker-options) | null |
| time-picker-options | custom time-picker | [time-picker-options](#time-picker-options) | null |
| minute-step | if > 0 don't show the second picker | 0 - 60 | 0 |
| first-day-of-week | set the first day of week | 1 - 7 | 7 |
| input-class | the input class name | `string` | 'mx-input' |
@@ -114,7 +114,7 @@ export default {
set the format of binding value
| Value | Description |
|-----------------|-------------------------------------------|
|-----------------|-------------------------------------------|
| date | binding value will be a Date object |
| timestamp | binding value will be a timestamp number |
| format | binding value will be the format string |
@@ -138,7 +138,7 @@ Advanced: You can also customize objects to implement two functions.
the shortcuts for the range picker
| Value | Description |
|-----------------|-------------|
|-----------------|-------------|
| true | show the default shortcuts |
| false | hide the defaualt shortcuts |
| [{text: string, onClick: () => any }] | custom shortcuts |
@@ -167,7 +167,7 @@ custom time-picker
#### panel
| Value | Description |
|-------|----------------------|
|-------|----------------------|
| NONE | when panel is closed |
| DATE | when panel is date |
| YEAR | when panel is year |
@@ -177,16 +177,22 @@ custom time-picker
### Slots
| Name | Description |
|-----------------|--------------------------|
|-----------------|--------------------------|
| calendar-icon | custom the calender icon |
| header | popup header |
| footer | popup footer |
## ChangeLog
## ChangeLog
[CHANGELOG](CHANGELOG.md)
## Donate
If you find this project useful, you can buy author a glass of juice
[Paypal Me](https://www.paypal.me/mengxiong10)
## License
[MIT](https://github.com/mengxiong10/vue2-datepicker/blob/master/LICENSE)
+20 -14
View File
@@ -85,7 +85,7 @@ export default {
|------|--------------|-------|---------|
| type | 选择日期类型 | 'date' \| 'datetime' \| 'year' \| 'month' \| 'time' | 'date' |
| range | 如果是true, 显示日历范围选择 | `boolean` | false |
| format | 格式化显示日期, 值类似moment.js | [token](https://github.com/taylorhakes/fecha#formatting-tokens) \| [`object`](https://github.com/mengxiong10/vue2-datepicker/issues/232#issuecomment-458558141) | 'YYYY-MM-DD' |
| format | 格式化显示日期, 值类似moment.js | [token](https://github.com/taylorhakes/fecha#formatting-tokens) \| [`object`](https://github.com/mengxiong10/vue2-datepicker/issues/232#issuecomment-458558141) | 'YYYY-MM-DD' |
| value-type | 设置绑定值的格式, 默认返回日期对象 | [value-type](#value-type) | 'date' |
| lang | 选择语言或自定义 | [lang](#lang) | 'zh' |
| clearable | 如果设置false, 不显示清除图标 | `boolean` | true |
@@ -101,7 +101,7 @@ export default {
| not-after | 禁止选择这个时间之前=后的时间 | `string`\|`Date`| '' |
| disabled-days | 自定义禁止的日期 | `(date) => boolean` | - |
| shortcuts | 自定义范围选择的时候快捷选项 | [shortcuts](#shortcuts) | true |
| time-picker-options | 自定义时间选择的开始,结束,步进 | [time-picker-options](#time-picker-options) | null |
| time-picker-options | 自定义时间选择的开始,结束,步进 | [time-picker-options](#time-picker-options) | null |
| minute-step | 设置分钟的步进, 设置大于0不显示秒的选择(0-60) | 0 - 60 | 0 |
| first-day-of-week | 设置日历星期几开头 | 1 - 7 | 7 |
| input-class | 自定义input元素的类名 | `string` | 'mx-input' |
@@ -114,7 +114,7 @@ export default {
设置绑定值的格式
| 可选值 | 描述 |
|-----------------|-------------------------------------------|
|-----------------|-------------------------------------------|
| date | 返回的绑定值是Date对象 |
| timestamp | 返回的绑定值是时间戳数字 |
| format | 返回的绑定值是通过`format`属性格式化的值 |
@@ -137,7 +137,7 @@ export default {
#### shortcuts
| 可选值 | 描述 |
|-----------------|-------------|
|-----------------|-------------|
| true | 显示默认快捷选择 |
| false | 隐藏默认快捷选择 |
| [{text: string, onClick: () => any }] | 自定义快捷选择 |
@@ -151,14 +151,14 @@ export default {
| () => Array<{ label: string; values: { hours: number; minutes: number } }> |
### 事件
| Name | 说明 | 回调参数
| Name | 说明 | 回调参数
|-----------------|----------------------------- |----------------
| change | 日期改变的时候触发 | 选择的日期
| input | 日期改变的时候触发 | 选择的日期
| confirm | 点击确认按钮触发的事件 | 选择的日期
| clear | 清空时候触发 |
| input-error | 当用户输入的值无效时候触发 | 用户输入的字符串
| panel-change | 切换面板时触发 | [panel](#panel), [oldPanel](#panel)
| change | 日期改变的时候触发 | 选择的日期
| input | 日期改变的时候触发 | 选择的日期
| confirm | 点击确认按钮触发的事件 | 选择的日期
| clear | 清空时候触发 |
| input-error | 当用户输入的值无效时候触发 | 用户输入的字符串
| panel-change | 切换面板时触发 | [panel](#panel), [oldPanel](#panel)
| calendar-change | 日历的年或月改变时触发 | 当前日历时间,过去日历时间
| focus | 当输入框获得焦点 |
| blur | 当输入框失去焦点 |
@@ -166,7 +166,7 @@ export default {
#### panel
| 值 | 描述 |
|-------|----------------------|
|-------|----------------------|
| NONE | 当面板关闭时的值 |
| DATE | 当面板是日期选择时的值 |
| YEAR | 当面板是年选择时的值 |
@@ -176,15 +176,21 @@ export default {
### Slots
| 名称 | 描述 |
|-----------------|--------------------------|
|-----------------|--------------------------|
| calendar-icon | 图标自定义 |
| header | 日历头部自定义 |
| footer | 日历尾部自定义 |
## 日志
## 日志
[CHANGELOG](CHANGELOG.md)
## 捐赠
如果这个项目帮到了你, 你可以请作者喝杯果汁
[Paypal Me](https://www.paypal.me/mengxiong10)
## 许可证