|
|
|
@ -23,6 +23,7 @@
|
|
|
|
|
format="yyyy 年 MM 月 dd 日"
|
|
|
|
|
:picker-options="pickerOptions"
|
|
|
|
|
@change="changedate"
|
|
|
|
|
@focus="handleDateFocus"
|
|
|
|
|
:clearable="false"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
@ -205,6 +206,15 @@ export default {
|
|
|
|
|
collectCourses() {
|
|
|
|
|
this.collect = !this.collect;
|
|
|
|
|
},
|
|
|
|
|
//focus时间重新赋值
|
|
|
|
|
handleDateFocus() {
|
|
|
|
|
// 更新pickerOptions的disabledDate函数,禁用大于当前时间的日期
|
|
|
|
|
this.pickerOptions.disabledDate = (date) => {
|
|
|
|
|
//console.log(date);
|
|
|
|
|
const currentDate = new Date();
|
|
|
|
|
return date.getTime() > currentDate.getTime(); // 禁用大于今天的日期
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
//选择时间
|
|
|
|
|
changedate() {
|
|
|
|
|
console.log(this.dateValue.getTime());
|
|
|
|
|