Skip to content

Commit

Permalink
Merge pull request #89 from joffreyBerrier/hotfix/remove-re-render
Browse files Browse the repository at this point in the history
remove rerender on disabledDate watch
  • Loading branch information
joffreyBerrier authored Apr 27, 2021
2 parents 6af76a1 + 32bea17 commit 9226605
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Release 1.0.6
https://github.com/joffreyBerrier/vue-hotel-datepicker/releases/tag/1.0.6
# Release 1.0.7
https://github.com/joffreyBerrier/vue-hotel-datepicker/releases/tag/1.0.7

# vue-hotel-datepicker@2

Expand Down
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-datepicker2",
"version": "1.0.6",
"version": "1.0.7",
"author": "Joffrey Berrier - Origin created by krystalcampioni",
"description": "Vue date range picker component fork of vue-hotel-datepicker create by krystalcampioni",
"main": "dist/vueHotelDatepicker2.common.js",
Expand Down
17 changes: 3 additions & 14 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export default {
},
data() {
return {
dynamicDisabledDates: [],
dynamicDisabledDates: ["2021-04-30", "2021-05-01", "2021-05-02"],
ptPT: {
night: "Noite",
nights: "Noites",
Expand Down Expand Up @@ -577,18 +577,7 @@ export default {
},
methods: {
renderNextMonth() {
this.dynamicDisabledDates = [
"2021-04-15",
"2021-04-16",
"2021-04-17",
"2021-04-18",
"2021-04-19",
"2021-04-20",
"2021-04-21",
"2021-05-01",
"2021-05-02",
"2021-05-03",
"2021-05-04",
this.dynamicDisabledDates.push(
"2021-05-11",
"2021-05-12",
"2021-05-13",
Expand All @@ -597,7 +586,7 @@ export default {
"2021-05-16",
"2021-05-17",
"2021-05-18"
];
);
},
toggleDatePickerOutside() {
this.$refs.DatePicker.showDatepicker();
Expand Down
4 changes: 2 additions & 2 deletions src/components/DatePicker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
:key="`${datepickerDayKey}-${monthIndex}-${dayIndex}`"
>
<Day
v-if="day.belongsToThisMonth"
v-show="day.belongsToThisMonth"
:activeMonthIndex="activeMonthIndex"
:bookings="sortBookings"
:checkIn="checkIn"
Expand Down Expand Up @@ -567,7 +567,6 @@ export default {
},
disabledDates(newVal) {
this.createHalfDayDates(newVal);
this.reRender();
},
isOpen(value) {
if (this.isMobile && !this.alwaysVisible) {
Expand Down Expand Up @@ -1334,6 +1333,7 @@ export default {
},
renderNextMonth() {
this.$emit("renderNextMonth");
const countOfDesktopMonth = this.isDesktop
? this.countOfDesktopMonth
: this.countOfMobileMonth;
Expand Down

0 comments on commit 9226605

Please sign in to comment.