Problem: Disabling the date after today cannot be selected. After successfully disabling, clicking the Now button in the component is invalid.
html:
<el-date-picker v-model="ruleForm.finish_time" :picker-options="pickerOptions" size="small" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" />
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now()
}
},
}
solve:
In the disableddate, delete-8.64e6 (the number of seconds in a day), and you can click the now button.