<el-date-picker v-model="value1" type="date" placeholder="选择日期" :options="limitDate"></el-date-picker>
data(){
return{
limiDate:{
disabledDate(date){
const curDate = new Date();
let year = curDate.getFullYear();
let month = curDate.getMonth() +1;
let day =1;
let currentDay = curDate.getDate();
let nextMonth = month +1;
let preThreeMonth = month - 3;
let currentDate = year + '-' + month + '-' + currentDay;
let preThreeDate = year + '-' + preThreeMonth + '-' + day;
//valueOf()返回Date对象的原始值
return date.valueOf() < (Date.parse(preThreeDate)) || date.valueOf() > (Date.parse(currentDate) - 86400000);
}
}
}
}