<el-date-picker
v-model="week"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
size="small"
value-format="yyyy-MM-dd"
:clearable="false"
:editable="false"
:picker-options="pickerOptions"
></el-date-picker>
data(){
return{
pickerOptions: {
disabledDate(time) {
let curDate = new Date().getTime();
let three = 180 * 24 * 3600 * 1000;
let threeMonths = curDate - three;
var thatDay = time.getTime();
return (
time.getTime() > Date.now() - 8.64e6 ||
time.getTime() < threeMonths
);
},
},
}
}