Commit bd011445 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

DatePicker: fix disabled in range mode

parent 3f12de1f
......@@ -31,7 +31,8 @@
class="el-date-editor el-range-editor el-input__inner"
:class="[
'el-date-editor--' + type,
'el-range-editor--' + pickerSize,
pickerSize ? `el-range-editor--${ pickerSize }` : '',
disabled ? 'is-disabled' : '',
pickerVisible ? 'is-active' : ''
]"
@click="handleRangeClick"
......@@ -45,6 +46,7 @@
<input
:placeholder="startPlaceholder"
:value="displayValue && displayValue[0]"
:disabled="disabled"
@input="handleStartInput"
@change="handleStartChange"
@focus="handleFocus"
......@@ -53,6 +55,7 @@
<input
:placeholder="endPlaceholder"
:value="displayValue && displayValue[1]"
:disabled="disabled"
@input="handleEndInput"
@change="handleEndChange"
@focus="handleFocus"
......
......@@ -146,4 +146,28 @@
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;
}
}
}
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