longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

Disable individual days #409

Closed xApep closed 6 years ago

xApep commented 6 years ago

Hi. Is it possible do disable individual days in datepicker? Let say we have a hotel availability date-picker, some days are available and some are not, is it possible to disable (can't be selected) those which are not available?

For example: image

Thanks!

holtkamp commented 6 years ago

Yes, have a look at beforeShowDay() function at http://longbill.github.io/jquery-date-range-picker/, for the "disabled" days, the first entry of the array should be false...

xApep commented 6 years ago

Thanks!