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

When Bookings are present disabled Dates are not there or partially there. #324

Closed goors closed 4 months ago

goors commented 1 year ago

Describe the bug When bookings is present with disabledDates, disabled dates are not visible.

To Reproduce Steps to reproduce the behavior:

  1. Set booked dates to any range
  2. Set disabledDates to any range

Expected behavior I should be able to see disabled dates and not be able to click on them.

Screenshots Disabled dates

Bookings

As you can see, when Bookings are present you see some disabled dates.

goors commented 1 year ago

Also, halfDay if true, you can go on and select from 6th to any day in the future. But 8th is kind of skipped, and it is disabled date.

goors commented 1 year ago

As far as i can tell you can not have both, disabled days and bookings. This function is preventing that:

if (this.sortBookings.length === 0) {///} will never fire since you got bookings. That is part of that method createHalfDayDates(_baseHalfDayDates)

goors commented 1 year ago

I have check it again:

  1. set disabled dates
  2. setTimeout to 5 seconds and then add bookings

Result is disabled dates are gone because of that condition.

Only solution is to remove that and let that for loop fire always.

Background in that case looks wired if you have bookings and disabled dates. Since built is absolute and disabled div has background colour you can not see part of the bullet.

matiasperrone commented 7 months ago

Hi @goors,

I didn't have time to expend on this project yet, or read y Do you were able to check what's wrong? do you have code to fix this that may respect back compatibility?

matiasperrone commented 4 months ago

Hi @goors so can you give me some update on this?

matiasperrone commented 4 months ago

Check my answer here https://github.com/ZestfulNation/vue-hotel-datepicker/issues/268