jquery-date-range-picker icon indicating copy to clipboard operation
jquery-date-range-picker copied to clipboard

Is there a way to disable dates for checkin / checkout only?

Open davleh opened this issue 8 years ago • 7 comments
trafficstars

Usage: Hotel Booking

Is there a way to disable dates for checkin / checkout only, so that these days can’t be selected as start or end date, however booking / selecting a period over these days / containing these days should be possible.

davleh avatar Nov 21 '16 08:11 davleh

Mm, you can have a look at the beforeShowDay function. Not sure how that affects the ability to select such dates as "in between" dates...

holtkamp avatar Nov 21 '16 09:11 holtkamp

Thanks @holtkamp for your quick reply!

Unfortunately if this method returns valid = false, selecting periods over/through the specified day is not possible any more.

A good thing would be to offer 3 options here: disabling as start date, disabling as end date and disabling for selecting through.

Perhaps there is already an option offering that functionality and I just did not find it. In this case I would be very happy if someone could point me at it. ;)

davleh avatar Nov 21 '16 09:11 davleh

@davleh Looking for the same functionality. Did you find anything?

I also need to be able to select a range of days around the disabled days.

DeveloperWilco avatar Sep 12 '17 09:09 DeveloperWilco

@DeveloperWilco: Unfortunately I was not able to find any option to achieve this. I tried to implement this functionality into this datepicker to create a pull request later on, but gave up.

davleh avatar Sep 12 '17 12:09 davleh

@davleh: Then i'm doing the same. I'll just validate it with PHP right after. Thanks for your quick reply

DeveloperWilco avatar Sep 12 '17 12:09 DeveloperWilco

It seems to be an error from function isValidTime (Line 1 575) Removing lines from 1 594 to 1 598 fix my problem. (Or change valid = false; to valid = true; on line 1 596

dev-overnode avatar Jun 15 '19 09:06 dev-overnode

looking for the same, did anyone find a proper way to achieve this?

carlosnasillo avatar Apr 09 '22 18:04 carlosnasillo

looking for the same, did anyone find a proper way to achieve this? 🙏

carlosnasillo avatar Feb 08 '23 20:02 carlosnasillo