element-ui如何设置结束时间必须大于开始时间


        
            


        
        
 data () {
      return {
        dataForm: {
          startTime:'',
          endTime:''
        },
       
        pickerOptionsStart: {
           disabledDate: time => {
             let endDateVal = this.dataForm.endTime;
             if (endDateVal) {
                return time.getTime() > new Date(endDateVal).getTime();
             }
           }
        },
        pickerOptionsEnd: {
           disabledDate: time => {
             let beginDateVal = this.dataForm.startTime;
             if (beginDateVal) {
               return (time.getTime()

 

你可能感兴趣的:(VUE)