mirror of https://github.com/ElemeFE/element
parent
a5e5be3d7a
commit
a1324324a2
|
@ -265,6 +265,11 @@
|
|||
oldDate.setHours(hour);
|
||||
oldDate.setMinutes(minute);
|
||||
oldDate.setSeconds(second);
|
||||
if (typeof this.disabledDate === 'function' && this.disabledDate(oldDate)) {
|
||||
this.$refs.timepicker.disabled = true;
|
||||
return;
|
||||
}
|
||||
this.$refs.timepicker.disabled = false;
|
||||
this.date = new Date(oldDate.getTime());
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
@click="handleCancel">{{ t('el.datepicker.cancel') }}</button>
|
||||
<button
|
||||
type="button"
|
||||
class="el-time-panel__btn confirm"
|
||||
class="el-time-panel__btn"
|
||||
:class="{confirm: !disabled}"
|
||||
@click="handleConfirm()">{{ t('el.datepicker.confirm') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -101,7 +102,8 @@
|
|||
currentDate: this.$options.defaultValue || this.date || new Date(),
|
||||
currentVisible: this.visible || false,
|
||||
width: this.pickerWidth || 0,
|
||||
selectionRange: [0, 2]
|
||||
selectionRange: [0, 2],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue