ZestfulNation / vue-hotel-datepicker

A VueJS v2 responsive date range picker. Displays the number of nights selected and allow several useful options like custom check-in/check-out rules, localization support and more.
https://zestfulnation.github.io/vue-hotel-datepicker/
MIT License
840 stars 220 forks source link

"value" is never mutated (v-model) #233

Closed sloopsight closed 3 years ago

sloopsight commented 4 years ago

Description

BUG

After selecting checking and checkout v-model not setting date to value

Code sample

<!-- fieldDateRange.vue -->
<template>
  <div class="md-layout">
    <label class="text-left md-form-label">
      {{ schema.placeholder }}
    </label>
    <HotelDatePicker :hoveringTooltip="false" v-model="value">
    </HotelDatePicker>
  </div>
</template>

<script>
import { abstractField } from "vue-form-generator";
import HotelDatePicker from "vue-hotel-datepicker";

import "vue-hotel-datepicker/dist/vueHotelDatepicker.css";

export default {
  mixins: [abstractField],
  components: { HotelDatePicker },

  data() {
    return {
      ptBr: {
        tooltip: "",
        night: "Date",
        nights: "Dates",
        "day-names": ["Sun", "Mon", "Tue", "Wed", "Thru", "Fri", "Sat"],
        "check-in": "From",
        "check-out": "To",
        "month-names": [
          "Jan",
          "Feb",
          "Mar",
          "Abril",
          "May",
          "June",
          "July",
          "Aug",
          "Sep",
          "Oct",
          "Nov",
          "Dec"
        ]
      }
    };
  }
};
</script>
superbiche commented 4 years ago

@sloopsight could you please add the content of the abstractField mixin please? So we can actually see what value is?

matiasperrone commented 4 years ago

@sloopsight check that "value" seems to be undefined, must be declared in the "data" section or within the mixin.

matiasperrone commented 4 years ago

I'll close this issue because we didn't get any feedback.

matiasperrone commented 4 years ago

@sloopsight sorry, my mistake. We will be fixing this issue.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

matiasperrone commented 3 years ago

Solved! (beta 11) https://github.com/krystalcampioni/vue-hotel-datepicker/releases/tag/v4.0.0-beta.11