From f789158a4c482c05a24339b4e6179829df7aae30 Mon Sep 17 00:00:00 2001 From: zendy kim Date: Tue, 17 Jul 2018 10:48:14 +0900 Subject: [PATCH] selectYear selectMonth function modify --- src/calendar.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/calendar.vue b/src/calendar.vue index 6a307e6..c93f05f 100644 --- a/src/calendar.vue +++ b/src/calendar.vue @@ -187,9 +187,9 @@ export default { } }, init () { - if (this.type.toLowerCase() == 'month') { + if (this.type.toLowerCase() === 'month') { this.panel = 'MONTH' - } else if (this.type.toLowerCase() == 'year') { + } else if (this.type.toLowerCase() === 'year') { this.panel = 'YEAR' } else { this.panel = 'DATE' @@ -256,7 +256,7 @@ export default { selectYear (year) { this.changeCalendarYear(year) if (this.type.toLowerCase() === 'year') { - return this.selectDate(this.now) + return this.selectDate(new Date(this.now)) } this.showPanelMonth() }, @@ -264,7 +264,7 @@ export default { this.changeCalendarMonth(month) if (this.type.toLowerCase() === 'month') { - return this.selectDate(this.now) + return this.selectDate(new Date(this.now)) } this.showPanelDate()