element ui datePicker 设置当前日期之前的日期不可选

 <template>
    <el-date-picker
      v-model="value2"
      align="right"
      type="date"
      placeholder="选择日期"
      :picker-options="pickerOptions1">
    </el-date-picker> 
</template>


<script>
  export default {
    data() {
      return {
        pickerOptions1: {
         disabledDate(time) {
            return time.getTime() < Date.now() - 8.64e7;
          },
        }        
      }
    }
  }
posted @ 2018-10-17 14:58  lilelile  阅读(8132)  评论(2编辑  收藏  举报