时间段范围
computed: {
pickerOptions(){
let _this = this
return {
disabledDate(time) {
const times = 86400000 * 7//一周的毫秒数
let curSelectTime = new Date(_this.minDate).getTime()
let before = curSelectTime - times//前一周毫秒数
let after = curSelectTime + times//后一周毫秒数
return time.getTime() > after || time.getTime() < before
},
onPick({maxDate, minDate}) {
if (!maxDate) {
_this.minDate = minDate
}
}
}
}
}