el-date-picker After disabling the date, there is no response when clicking the [At this moment] button

Problem description:
After using the el-date-picker component and prohibiting the selection of future dates, there is no response when clicking the [Now] button.
Solution:
Disable passing value -8.64e7 to picker-options (remember to subtract 24 hours from the current date, otherwise the current day cannot be selected)

 disabledDate(date) {
    
    
    // - 8.64e7 解决此刻无法点击
    return date.getTime() - 8.64e7 > Date.now() - 24 * 60 * 60 * 1000;
 },

Guess you like

Origin blog.csdn.net/qq_40896145/article/details/131514347
Recommended