vue-hotel-datepicker icon indicating copy to clipboard operation
vue-hotel-datepicker copied to clipboard

Half day documentation

Open ShapesGraphicStudio opened this issue 4 years ago • 3 comments

Hello, Could you please put out some documentaion on the half day use? I can read : "Allows to have half a day, if you have check in at noon and checkout before noon" but I can't see how to implement this.

I'm having some issues with disabled dates.

EXAMPLE: I have bookings: from the 15th to the 16th of the month from the 17th to the 21st of the month from the 23rd to the 24th of the month from the 25th to the 26th of the month

So the user should be able to book: from the 16th to the 17th of the month from the 21st to the 23rd of the month from the 24th to the 25th of the month

My disabled dates calculation goes like: $period = CarbonPeriod::create($booking->starts_at, $booking->ends_at); which disables too many dates

If I try something like: $period = CarbonPeriod::create(Carbon::parse($booking->starts_at)->addDay(), Carbon::parse($booking->ends_at)->subDay()); It re-enables all the dates I need but the ranges I can select are too wide, now I can book from the 21st to the 25th.

Given the upper example I shouldn't be able to book: from the 21st to the 25th but only: from the 21st to the 23rd and from the 24th to the 25th

So the only way to solve this should be Half days. Could you document on how to get this done please?

ShapesGraphicStudio avatar Oct 12 '21 16:10 ShapesGraphicStudio

Hi David @ShapesGraphicStudio,

I didn't develop that part of the component, I will check it out so we may set an example. Maybe @krystalcampioni or @superbiche can help us to speed up the process.

Have a nice one!

matiasperrone avatar Oct 13 '21 00:10 matiasperrone

Hi @ShapesGraphicStudio did you fixed your issue some how? Do you want to share?

matiasperrone avatar Jan 07 '22 15:01 matiasperrone

Hello, I finally got some time to read this all more carefully. The important notice I missed in the documentation (can't remeber if this piece was there last year) was " if you have check in at noon and checkout before noon ".

Now when requesting my disabled dates, the bookings I already have stored, I change the format from Y-m-d to Y-m-d H:i, and I "force" the starting date to be at 15:00 and the ending date at 11:00 for each booking. It seems to work now.

ShapesGraphicStudio avatar Feb 27 '23 09:02 ShapesGraphicStudio