el-date-picker can’t click the now button after disabling the date, disabling the date after today is accurate to the hour, minute and second

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. 

element development collection, not private

Guess you like

Origin blog.csdn.net/z00001993/article/details/109289845