5586c14a by simon

默认提交

1 parent 15a893f0
......@@ -310,11 +310,11 @@ export default {
let yearList = [];
for (let index = 0; index < 12; index++) {
yearList.push({
year: yearPage * 10 + index ,
year: yearPage * 10 + index,
// disable: index == 0 || index == 11,
// gray: index == 0 || index == 11,
disable: index >= 10,
gray: index >= 10,
gray: index >= 10,
});
}
this.yearRange = `${yearPage * 10 + 0}-${yearPage * 10 + 9}`
......@@ -413,9 +413,11 @@ export default {
}
});
if (!disable) {
if (this.formatter == "yyyy-MM-dd") {
disable = !/^((?!0000)[0-9]{4}-((0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-8])|(0[13-9]|1[0-2])-(29|30)|(0[13578]|1[02])-31)|([0-9]{2}(0[48]|[2468][048]|[13579][26])|(0[48]|[2468][048]|[13579][26])00)-02-29)$/.test(dateValue);
let reDateValue = dateValue;
if (this.formatter == "dd-MM-yyyy") {
reDateValue = ddMMyyyy2yyyyMMdd(reDateValue);
}
disable = !/^((?!0000)[0-9]{4}-((0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-8])|(0[13-9]|1[0-2])-(29|30)|(0[13578]|1[02])-31)|([0-9]{2}(0[48]|[2468][048]|[13579][26])|(0[48]|[2468][048]|[13579][26])00)-02-29)$/.test(reDateValue);
}
let result = {
dateValue: this.dateValue,
......