标签:bsp get 添加 mode rac -o ble EDA time()
当点击elementui 的DatePicker组件,如果日期超过当前的日期就不能够点击
<el-date-picker class="select" value-format="yyyy-MM" :picker-options="deadlineDate" format="yyyy-MM" v-model="endMonth" type="month" placeholder="endDate"> </el-date-picker>
首先给html中加入 :picker-options="deadlineDate"
export default { data() { return { deadlineDate: { disabledDate: (time) => { return time.getTime() > moment().subtract(1, ‘days‘) } },
}
然后给deadlineDate添加disabledDate方法,这里用到了moment时间插件,可以在main.js全局引用,然后就好啦!
标签:bsp get 添加 mode rac -o ble EDA time()
原文地址:https://www.cnblogs.com/alhh/p/9088335.html