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

DatePicker: fix disabled in range mode

parent 3f12de1f
...@@ -31,7 +31,8 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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;
}
}
} }
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