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

Disabled dates issue when using halfDay after upddate #323

Closed ShapesGraphicStudio closed 4 months ago

ShapesGraphicStudio commented 1 year ago

Hello, I just updated to latest version. I'm facing an issue as I'm able to select a range with disabled dates in it when HalfDay is set to true.

On first opening, calendar shows nicely with disabled dates and half days:

Capture d’écran 2023-03-16 à 18 04 28

I can see that if I select March 24th, the max end date of my range should be March 27. But wwhen selecting March 24th, the max date is set to April 8th wich is the day before a full disabled date. Seems like it does not recognize half days here.

Capture d’écran 2023-03-16 à 18 04 44

And as we cans see in last screenshot, I'm able to select a booking from March 24th to APril 8th which can lead to double / overlapping bookings.

Capture d’écran 2023-03-16 à 18 04 58

Any idea on how to solve this please?

BTW, I'm missing the icons here, maybe because it's my local config?

matiasperrone commented 4 months ago

Hello @ShapesGraphicStudio,

Sorry for the SUUUUUPER late response. Last year was really bad for me, and there are no other devs maintaining this component. Yeah, this is a known issue... fixing it is more complex than what it seems from my side.

The current code is complex, should be simple but is not. Remember you can always push a PR for this.

So in the end what did you do with this?

matiasperrone commented 4 months ago

I remembered! Set the timezone so it can work accordingly.