
这样的日期动态修改,禁止选择默认日期的之前时间
<el-table-column property="" align="center" label="配送开始时间" min-width="120":show-overflow-tooltip="true">
<template slot-scope="scope">
<el-date-picker
:clearable="false"
v-model="scope.row.purchaseCycleStartDate"
type="date"
@focus="testPurchaseCycleStartDate(scope.row.purchaseCycleStartDate)"
:picker-options="pickerOptions1"
placeholder="选择日期">
</el-date-picker>
</template>
</el-table-column>
computed: {
pickerOptions1() {
let that = this;
return {
disabledDate(time) {
let maxDate = Date.parse(that.startDate);
return time.getTime() <= maxDate;
}
}
}
}
testPurchaseCycleStartDate(row) {
this.startDate = row
}