mirror of https://github.com/ElemeFE/element
DatePicker: add range-separator prop, close #2568
parent
5e455f911f
commit
82932c0040
|
@ -261,6 +261,7 @@ Picking a date range is supported.
|
|||
| align | alignment | left/center/right | left |
|
||||
| popper-class | custom class name for DatePicker's dropdown | string | — | — |
|
||||
| picker-options | additional options, check the table below | object | — | {} |
|
||||
| range-separator | range separator | string | - | ' - ' |
|
||||
|
||||
### Picker Options
|
||||
| Attribute | Description | Type | Accepted Values | Default |
|
||||
|
|
|
@ -216,6 +216,7 @@ Select date and time in one picker.
|
|||
| align | alignment | left/center/right | left |
|
||||
| popper-class | custom class name for DateTimePicker's dropdown | string | — | — |
|
||||
| picker-options | additional options, check the table below | object | — | {} |
|
||||
| range-separator | range separator | string | - | ' - ' |
|
||||
|
||||
### Picker Options
|
||||
| Attribute | Description | Type | Accepted Values | Default |
|
||||
|
|
|
@ -295,6 +295,7 @@
|
|||
| align | 对齐方式 | string | left, center, right | left |
|
||||
| popper-class | DatePicker 下拉框的类名 | string | — | — |
|
||||
|picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} |
|
||||
| range-separator | 选择范围时的分隔符 | string | - | ' - ' |
|
||||
|
||||
### Picker Options
|
||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||||
|
|
|
@ -239,6 +239,7 @@
|
|||
| align | 对齐方式 | string | left, center, right | left |
|
||||
| popper-class | DateTimePicker 下拉框的类名 | string | — | — |
|
||||
| picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} |
|
||||
| range-separator | 选择范围时的分隔符 | string | - | ' - ' |
|
||||
|
||||
### Picker Options
|
||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||||
|
|
|
@ -43,7 +43,7 @@ const NewPopper = {
|
|||
beforeDestroy: Popper.beforeDestroy
|
||||
};
|
||||
|
||||
const RANGE_SEPARATOR = ' - ';
|
||||
let RANGE_SEPARATOR = ' - ';
|
||||
const DEFAULT_FORMATS = {
|
||||
date: 'yyyy-MM-dd',
|
||||
month: 'yyyy-MM',
|
||||
|
@ -202,6 +202,9 @@ export default {
|
|||
default: 'left'
|
||||
},
|
||||
value: {},
|
||||
rangeSeparator: {
|
||||
default: ' - '
|
||||
},
|
||||
pickerOptions: {}
|
||||
},
|
||||
|
||||
|
@ -324,6 +327,7 @@ export default {
|
|||
},
|
||||
|
||||
created() {
|
||||
RANGE_SEPARATOR = this.rangeSeparator;
|
||||
// vue-popper
|
||||
this.options = {
|
||||
boundariesPadding: 0,
|
||||
|
|
Loading…
Reference in New Issue