mirror of https://github.com/ElemeFE/element
DatePicker: fix disabled in range mode
parent
3f12de1f79
commit
bd0114454e
|
@ -31,7 +31,8 @@
|
||||||
class="el-date-editor el-range-editor el-input__inner"
|
class="el-date-editor el-range-editor el-input__inner"
|
||||||
:class="[
|
:class="[
|
||||||
'el-date-editor--' + type,
|
'el-date-editor--' + type,
|
||||||
'el-range-editor--' + pickerSize,
|
pickerSize ? `el-range-editor--${ pickerSize }` : '',
|
||||||
|
disabled ? 'is-disabled' : '',
|
||||||
pickerVisible ? 'is-active' : ''
|
pickerVisible ? 'is-active' : ''
|
||||||
]"
|
]"
|
||||||
@click="handleRangeClick"
|
@click="handleRangeClick"
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
<input
|
<input
|
||||||
:placeholder="startPlaceholder"
|
:placeholder="startPlaceholder"
|
||||||
:value="displayValue && displayValue[0]"
|
:value="displayValue && displayValue[0]"
|
||||||
|
:disabled="disabled"
|
||||||
@input="handleStartInput"
|
@input="handleStartInput"
|
||||||
@change="handleStartChange"
|
@change="handleStartChange"
|
||||||
@focus="handleFocus"
|
@focus="handleFocus"
|
||||||
|
@ -53,6 +55,7 @@
|
||||||
<input
|
<input
|
||||||
:placeholder="endPlaceholder"
|
:placeholder="endPlaceholder"
|
||||||
:value="displayValue && displayValue[1]"
|
:value="displayValue && displayValue[1]"
|
||||||
|
:disabled="disabled"
|
||||||
@input="handleEndInput"
|
@input="handleEndInput"
|
||||||
@change="handleEndChange"
|
@change="handleEndChange"
|
||||||
@focus="handleFocus"
|
@focus="handleFocus"
|
||||||
|
|
|
@ -146,4 +146,28 @@
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include when(disabled) {
|
||||||
|
background-color: $--input-disabled-fill;
|
||||||
|
border-color: $--input-disabled-border;
|
||||||
|
color: $--input-disabled-color;
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
border-color: $--input-disabled-border;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
background-color: $--input-disabled-fill;
|
||||||
|
color: $--input-disabled-color;
|
||||||
|
cursor: not-allowed;
|
||||||
|
&::placeholder {
|
||||||
|
color: $--input-disabled-placeholder-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-range-separator {
|
||||||
|
color: $--input-disabled-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue