Skip to content

Commit

Permalink
v4.5 version bump and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasperrone committed Sep 9, 2021
1 parent 2b42343 commit bb12abc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-hotel-datepicker",
"version": "4.4.3",
"version": "4.5.0",
"description": "A responsive date range picker for Vue.js that displays the number of nights selected and allow several useful options like custom check-in/check-out rules, localization support and more",
"author": "krystalcampioni <hello@krystalcampioni.com>",
"main": "dist/vueHotelDatepicker.common.js",
Expand Down
16 changes: 9 additions & 7 deletions src/DatePicker/HotelDatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1222,19 +1222,21 @@ export default {
},
renderPreviousMonth() {
if (this.activeMonthIndex >= 1) {
const firstDayOfLastMonth = this.months[this.activeMonthIndex].days.filter(
const firstDayOfLastMonth = this.months[this.activeMonthIndex].days.filter(
(day) => day.belongsToThisMonth === true,
)
const previousMonth = this.getPreviousMonth(firstDayOfLastMonth[0].date)
)
const previousMonth = this.getPreviousMonth(firstDayOfLastMonth[0].date)
this.activeMonthIndex--
this.activeMonthIndex--
this.$emit('previous-month-rendered', previousMonth)
this.$emit('previous-month-rendered', previousMonth)
}
},
renderNextMonth: throttle(function throttleRenderNextMonth() {
if ((!this.showSingleMonth && this.activeMonthIndex < this.months.length - 2) || (this.showSingleMonth && this.activeMonthIndex < this.months.length - 1)) {
if (
(!this.showSingleMonth && this.activeMonthIndex < this.months.length - 2) ||
(this.showSingleMonth && this.activeMonthIndex < this.months.length - 1)
) {
this.activeMonthIndex++
return
Expand Down

0 comments on commit bb12abc

Please sign in to comment.