methods: { pickerOptions(date) { return{ disabledDate(time){ console.log(date) return ( time.getTime() < new Date(date).getTime() ); } } }, }
html:
<el-date-picker v-model="newlyAdded.endTime" type="datetime" value-format='yyyy-MM-dd HH:mm:ss' placeholder="请选择结束时间" :picker-options="pickerOptions(newlyAdded.startTime)"> </el-date-picker>