Skip to content

Instantly share code, notes, and snippets.

@andilabs
Created June 30, 2022 17:20
Show Gist options
  • Save andilabs/7b557c9c306c467212ed1be7767e4799 to your computer and use it in GitHub Desktop.
Save andilabs/7b557c9c306c467212ed1be7767e4799 to your computer and use it in GitHub Desktop.
jQuery(function($) {
$("#config-demo").daterangepicker({
isInvalidDate: function(date) {
var dateRanges = [
{ 'start': moment('2022-08-25'), 'end': moment('2022-08-30') }
];
return dateRanges.reduce(function(bool, range) {
return bool || (date >= range.start && date <= range.end);
}, false);
},
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment