Commit 82932c00 authored by qingwei.li's avatar qingwei.li Committed by 杨奕

DatePicker: add range-separator prop, close #2568

parent 5e455f91
...@@ -261,6 +261,7 @@ Picking a date range is supported. ...@@ -261,6 +261,7 @@ Picking a date range is supported.
| align | alignment | left/center/right | left | | align | alignment | left/center/right | left |
| popper-class | custom class name for DatePicker's dropdown | string | — | — | | popper-class | custom class name for DatePicker's dropdown | string | — | — |
| picker-options | additional options, check the table below | object | — | {} | | picker-options | additional options, check the table below | object | — | {} |
| range-separator | range separator | string | - | ' - ' |
### Picker Options ### Picker Options
| Attribute | Description | Type | Accepted Values | Default | | Attribute | Description | Type | Accepted Values | Default |
......
...@@ -216,6 +216,7 @@ Select date and time in one picker. ...@@ -216,6 +216,7 @@ Select date and time in one picker.
| align | alignment | left/center/right | left | | align | alignment | left/center/right | left |
| popper-class | custom class name for DateTimePicker's dropdown | string | — | — | | popper-class | custom class name for DateTimePicker's dropdown | string | — | — |
| picker-options | additional options, check the table below | object | — | {} | | picker-options | additional options, check the table below | object | — | {} |
| range-separator | range separator | string | - | ' - ' |
### Picker Options ### Picker Options
| Attribute | Description | Type | Accepted Values | Default | | Attribute | Description | Type | Accepted Values | Default |
......
...@@ -295,6 +295,7 @@ ...@@ -295,6 +295,7 @@
| align | 对齐方式 | string | left, center, right | left | | align | 对齐方式 | string | left, center, right | left |
| popper-class | DatePicker 下拉框的类名 | string | — | — | | popper-class | DatePicker 下拉框的类名 | string | — | — |
|picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} | |picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} |
| range-separator | 选择范围时的分隔符 | string | - | ' - ' |
### Picker Options ### Picker Options
| 参数 | 说明 | 类型 | 可选值 | 默认值 | | 参数 | 说明 | 类型 | 可选值 | 默认值 |
......
...@@ -239,6 +239,7 @@ ...@@ -239,6 +239,7 @@
| align | 对齐方式 | string | left, center, right | left | | align | 对齐方式 | string | left, center, right | left |
| popper-class | DateTimePicker 下拉框的类名 | string | — | — | | popper-class | DateTimePicker 下拉框的类名 | string | — | — |
| picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} | | picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} |
| range-separator | 选择范围时的分隔符 | string | - | ' - ' |
### Picker Options ### Picker Options
| 参数 | 说明 | 类型 | 可选值 | 默认值 | | 参数 | 说明 | 类型 | 可选值 | 默认值 |
......
...@@ -43,7 +43,7 @@ const NewPopper = { ...@@ -43,7 +43,7 @@ const NewPopper = {
beforeDestroy: Popper.beforeDestroy beforeDestroy: Popper.beforeDestroy
}; };
const RANGE_SEPARATOR = ' - '; let RANGE_SEPARATOR = ' - ';
const DEFAULT_FORMATS = { const DEFAULT_FORMATS = {
date: 'yyyy-MM-dd', date: 'yyyy-MM-dd',
month: 'yyyy-MM', month: 'yyyy-MM',
...@@ -202,6 +202,9 @@ export default { ...@@ -202,6 +202,9 @@ export default {
default: 'left' default: 'left'
}, },
value: {}, value: {},
rangeSeparator: {
default: ' - '
},
pickerOptions: {} pickerOptions: {}
}, },
...@@ -324,6 +327,7 @@ export default { ...@@ -324,6 +327,7 @@ export default {
}, },
created() { created() {
RANGE_SEPARATOR = this.rangeSeparator;
// vue-popper // vue-popper
this.options = { this.options = {
boundariesPadding: 0, boundariesPadding: 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment