From b12695fff4d351988cdb093753c3c11a8c5a9cff Mon Sep 17 00:00:00 2001 From: iamkun Date: Wed, 28 Aug 2019 19:10:55 +0800 Subject: [PATCH] Calendar: fix locale error --- packages/calendar/src/main.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/calendar/src/main.vue b/packages/calendar/src/main.vue index 4bb41c2df48..9423ed4118f 100644 --- a/packages/calendar/src/main.vue +++ b/packages/calendar/src/main.vue @@ -188,7 +188,8 @@ export default { date() { if (!this.value) { 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) { return this.validatedRange[0][0]; }