Calendar: fix locale error

pull/17211/head
iamkun 2019-08-28 19:10:55 +08:00 committed by GitHub
parent 474ad25153
commit b12695fff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -188,7 +188,8 @@ export default {
date() { date() {
if (!this.value) { if (!this.value) {
if (this.realSelectedDay) { if (this.realSelectedDay) {
return new Date(this.selectedDay); const d = this.selectedDay.split('-');
return new Date(d[0], d[1] - 1, d[2]);
} else if (this.validatedRange.length) { } else if (this.validatedRange.length) {
return this.validatedRange[0][0]; return this.validatedRange[0][0];
} }