Fix calendar browsing after migrating to dayjs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="row calendar" :class="{ 'calendar--single': months == 1 }">
|
||||
<div class="row calendar" :class="{ 'calendar--single': isSingleCalendar }">
|
||||
<div class="col-xs-12" v-if="showHeader">
|
||||
<h2>Belegungskalender {{ hotelName }}</h2>
|
||||
</div>
|
||||
@@ -71,6 +71,11 @@
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isSingleCalendar () {
|
||||
return parseInt(this.months) === 1;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadCalendar () {
|
||||
let query = {};
|
||||
@@ -86,11 +91,11 @@
|
||||
});
|
||||
},
|
||||
next () {
|
||||
this.startDate.add(this.step, 'M');
|
||||
this.startDate = this.startDate.add(this.step, 'month');
|
||||
this.loadCalendar();
|
||||
},
|
||||
prev () {
|
||||
this.startDate.subtract(this.step, 'M');
|
||||
this.startDate = this.startDate.subtract(this.step, 'month');
|
||||
this.loadCalendar();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user