Commit 6d3bc51d authored by 童皓's avatar 童皓

Update u-calendar.vue

parent 7b1f2f03
......@@ -289,13 +289,9 @@
init() {
let now = new Date();
let minDate = new Date(this.minDate);
if (now < minDate) {
now = minDate;
}
let maxDate = new Date(this.maxDate);
if (now > maxDate) {
now = maxDate;
}
if (now < minDate) now = minDate;
if (now > maxDate) now = maxDate;
this.year = now.getFullYear();
this.month = now.getMonth() + 1;
this.day = now.getDate();
......@@ -644,4 +640,4 @@
}
}
}
</style>
\ No newline at end of file
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment