mirror of https://github.com/ElemeFE/element
Fix DatePicker style
parent
951c3de1bf
commit
01f6b9da7d
|
@ -70,7 +70,7 @@
|
|||
|
||||
## 禁用状态
|
||||
|
||||
<div class="demo-box demo-input">
|
||||
<div class="demo-box demo-input">
|
||||
<el-input
|
||||
:disabled="true"
|
||||
placeholder="请输入内容"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
@e time-header {
|
||||
position: relative;
|
||||
border-bottom: 1px solid var(--datepicker-inner-border-color);
|
||||
font-size: 0;
|
||||
font-size: 12px;
|
||||
padding: 8px 5px 5px 5px;
|
||||
display: flex;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
@e time-header {
|
||||
position: relative;
|
||||
border-bottom: 1px solid var(--datepicker-inner-border-color);
|
||||
font-size: 0;
|
||||
font-size: 12px;
|
||||
padding: 8px 5px 5px 5px;
|
||||
display: flex;
|
||||
|
||||
|
|
|
@ -115,9 +115,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="el-picker-panel__footer" v-if="showTime">
|
||||
<a
|
||||
<!-- <a
|
||||
class="el-picker-panel__link-btn"
|
||||
@click="changeToToday">{{ $t('datepicker.today') }}</a>
|
||||
@click="changeToToday">{{ $t('datepicker.today') }}</a> -->
|
||||
<button
|
||||
type="button"
|
||||
class="el-picker-panel__btn"
|
||||
|
@ -400,18 +400,15 @@
|
|||
this.rightTimePickerVisible = false;
|
||||
},
|
||||
|
||||
handleLeftTimePick(value) {
|
||||
if (!this.minDate) {
|
||||
this.minDate = new Date();
|
||||
}
|
||||
this.minDate.setHours(value.getHours());
|
||||
this.minDate.setMinutes(value.getMinutes());
|
||||
this.minDate.setSeconds(value.getSeconds());
|
||||
handleLeftTimePick(value, visible, first) {
|
||||
this.minDate = value || this.minDate || new Date();
|
||||
|
||||
this.minDate = new Date(this.minDate);
|
||||
if (!first) {
|
||||
this.leftTimePickerVisible = visible;
|
||||
}
|
||||
},
|
||||
|
||||
handleRightTimePick(value) {
|
||||
handleRightTimePick(value, visible, first) {
|
||||
if (!this.maxDate) {
|
||||
const now = new Date();
|
||||
if (now >= this.minDate) {
|
||||
|
@ -420,11 +417,11 @@
|
|||
}
|
||||
|
||||
if (this.maxDate) {
|
||||
this.maxDate.setHours(value.getHours());
|
||||
this.maxDate.setMinutes(value.getMinutes());
|
||||
this.maxDate.setSeconds(value.getSeconds());
|
||||
this.maxDate = value;
|
||||
}
|
||||
|
||||
this.maxDate = new Date(this.maxDate);
|
||||
if (!first) {
|
||||
this.rightTimePickerVisible = visible;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue