默认提交
Showing
1 changed file
with
6 additions
and
4 deletions
... | @@ -310,11 +310,11 @@ export default { | ... | @@ -310,11 +310,11 @@ export default { |
310 | let yearList = []; | 310 | let yearList = []; |
311 | for (let index = 0; index < 12; index++) { | 311 | for (let index = 0; index < 12; index++) { |
312 | yearList.push({ | 312 | yearList.push({ |
313 | year: yearPage * 10 + index , | 313 | year: yearPage * 10 + index, |
314 | // disable: index == 0 || index == 11, | 314 | // disable: index == 0 || index == 11, |
315 | // gray: index == 0 || index == 11, | 315 | // gray: index == 0 || index == 11, |
316 | disable: index >= 10, | 316 | disable: index >= 10, |
317 | gray: index >= 10, | 317 | gray: index >= 10, |
318 | }); | 318 | }); |
319 | } | 319 | } |
320 | this.yearRange = `${yearPage * 10 + 0}-${yearPage * 10 + 9}` | 320 | this.yearRange = `${yearPage * 10 + 0}-${yearPage * 10 + 9}` |
... | @@ -413,9 +413,11 @@ export default { | ... | @@ -413,9 +413,11 @@ export default { |
413 | } | 413 | } |
414 | }); | 414 | }); |
415 | if (!disable) { | 415 | if (!disable) { |
416 | if (this.formatter == "yyyy-MM-dd") { | 416 | let reDateValue = dateValue; |
417 | 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); | 417 | if (this.formatter == "dd-MM-yyyy") { |
418 | reDateValue = ddMMyyyy2yyyyMMdd(reDateValue); | ||
418 | } | 419 | } |
420 | 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); | ||
419 | } | 421 | } |
420 | let result = { | 422 | let result = { |
421 | dateValue: this.dateValue, | 423 | dateValue: this.dateValue, | ... | ... |
-
Please register or sign in to post a comment