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

Fix Generate Initial Months in case of Single Month View #300

Closed maaqib121 closed 2 years ago

maaqib121 commented 3 years ago

Bug: Create months up to check-in month + 1 month in generateInitialMonths() method's if condition, even if we pass :singleMonth="true". The disadvantage of this is when we are in singleMonth view and the current month is November, the next-month-rendered event will not trigger for the very next month (December), it will work for months next to December though as they aren't created yet.

Fix In case of :singleMonth="true", generateInitialMonths() method will create months up to checkin-month, while the default behavior for double months will remain the same.

P.S. I've already half fixed this issue in #277

matiasperrone commented 3 years ago

Hi @maaqib121,

I've been extremely busy this past months. Did you tested well? (I am really asking because I don't even have seen the code yet).

Have a nice one!

maaqib121 commented 3 years ago

Yes, I have tested it properly. It is basically the sub-part of use case which I covered in previous PR.

matiasperrone commented 2 years ago

Merged in v4.5.1