Skip to content

Commit

Permalink
Merge branch 'feature/month-change-events' into develop
Browse files Browse the repository at this point in the history
fixes #176
  • Loading branch information
talkhabi committed Sep 24, 2021
2 parents e265988 + 12f3524 commit ec44cf6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/picker/VuePersianDatetimePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1248,9 +1248,11 @@ export default {
},
nextMonth() {
this.date = this.date.clone().xAdd(1, 'month')
this.$emit('next-month', this.date.clone())
},
prevMonth() {
this.date = this.date.clone().xAdd(-1, 'month')
this.$emit('prev-month', this.date.clone())
},
selectDay(day) {
if (!day.date || day.disabled) return
Expand Down Expand Up @@ -1288,12 +1290,14 @@ export default {
if (year.disabled) return
this.date = this.date.clone().xYear(year.xYear())
this.selectedDates = [this.date.clone()]
this.$emit('year-change', year)
this.nextStep()
},
selectMonth(month) {
if (month.disabled) return
this.date = this.date.clone().xMonth(month.xMonth())
this.selectedDates = [this.date.clone()]
this.$emit('month-change', month)
this.nextStep()
},
submit(close = true) {
Expand Down

0 comments on commit ec44cf6

Please sign in to comment.