el的组件DateTimePicker如何只能选择到当前时间之前的包含时分秒
<template>
<div class="block">
<span class="demonstration">带快捷选项</span>
<el-date-picker v-model="value2" type="datetimerange" :picker-options="pickerOptions" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" align="right">
</el-date-picker>
</div>
</template>
<script>
export default {
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
},
},
value2: ''
};
}
};
</script>