소스 검색

Calendar: fix locale error

iamkun 6 년 전
부모
커밋
b12695fff4
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      packages/calendar/src/main.vue

+ 2 - 1
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];
         }