STEP 1
STEP 2
STEP 3
可复制的代码片段如下:
pickerOptions:{
disabledDate(time){
let currentTime=that.duration[0]
let threeMonths=60*60*1000*24*90
if(currentTime){
return time.getTime() >currentTime.getTime() + threeMonths || time.getTime() < currentTime.getTime() - threeMonths
}
},
onPick({minDate,maxDate}){
// 当第一时间选中才设置禁用
if(minDate && !maxDate){
that.duration[0]=minDate
}
if(maxDate){
that.duration[1]=maxDate
}
}
},
element 可参考api