优化时间选择

wp1.0
fanluyan 2 years ago
parent 4b33b2fb93
commit 70df922e2a

@ -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() {
// pickerOptionsdisabledDate
this.pickerOptions.disabledDate = (date) => {
//console.log(date);
const currentDate = new Date();
return date.getTime() > currentDate.getTime(); //
};
},
//
changedate() {
console.log(this.dateValue.getTime());

Loading…
Cancel
Save