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

Use only the past dates #185

Closed CavalcanteLeo closed 4 years ago

CavalcanteLeo commented 4 years ago

I am using it in another way, to select a period of time and show all reports of that period.

So, what I need is enable all past date and disable all future dates. Further more, would be grat if i would set which period

Is it possible?

i tried something like this, but didn't work:

<HotelDatePicker
    format="DD/MM/YYYY"
    :startDate="startDate"
    :endDate="endDate"
/>
import moment from "moment";

computed: {
    startDate() {
      return moment().subtract(2, "years");
    },
    endDate() {
      return moment();
    }
},
CavalcanteLeo commented 4 years ago

My bad, i wasn't passing a data object.