vue中Iview日期组件,可选此月不可选过去的所有月份的options

     options3: {

        disabledDate(date) {
          let nowTime = new Date()
          let month = nowTime.getMonth() + 1
          let year = nowTime.getFullYear()
          if (month - 1 == 0) {
            year = year - 1;
            month = 12;
          }

          return date && date.valueOf() < new Date(`${year}-${month}`);
        }
        
      },

你可能感兴趣的:(vue中Iview日期组件,可选此月不可选过去的所有月份的options)