Skip to content

Commit

Permalink
fix: locale date
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun committed Aug 28, 2019
1 parent 79a1b49 commit b817b4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/calendar/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit b817b4f

Please sign in to comment.