Commit 7b1f2f03 authored by heqin's avatar heqin Committed by 童皓

修复可以选择给定范围之外日期的错误

parent b9f2ad79
......@@ -288,6 +288,14 @@
},
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;
}
this.year = now.getFullYear();
this.month = now.getMonth() + 1;
this.day = now.getDate();
......
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