pickerOptions: {
onPick: ({ maxDate, minDate }) => {
this.pickDate = minDate.getTime()
if (maxDate) {
this.pickDate = ''
}
},
disabledDate: time => {
const choiceDateTime = new Date(this.pickDate).getTime()
const minTime = new Date(choiceDateTime).setMonth(new Date(choiceDateTime).getMonth() - 3)
const maxTime = new Date(choiceDateTime).setMonth(new Date(choiceDateTime).getMonth() + 3)
const min = minTime
const max = maxTime
if (this.pickDate) {
return time.getTime() < min || time.getTime() > max || time.getTime() > Date.now() - 8.64e7
} else {
return time.getTime() > Date.now() - 8.64e7
}
}
}