html
<el-date-picker v-model="fixValue" type="month" class="fl" value-format="yyyy-MM" clearable size="mini" placeholder="抉择日期" :picker-options="endDatePicker" > </el-date-picker>
data数据定义
data(){ return{ endDatePicker: this.handelFixDate(), fixValue:null }},
methods: handelFixDate() { console.log(this.fixValue, "132"); let self = this; return { disabledDate(time) { let t = new Date().getDate(); // 如果想蕴含本月本月 - 8.64e7 * t 就不须要了, // 如果想之前的不能抉择把 > 换成 < return time.getTime() > Date.now() - 8.64e7 * t; }, }; },
————————————————
版权申明:本文为CSDN博主「__不靠谱学生」的原创文章,遵循CC 4.0 BY-SA版权协定,转载请附上原文出处链接及本申明。
原文链接:https://blog.csdn.net/weixin_...