Skip to content

Instantly share code, notes, and snippets.

@antishok
Forked from anonymous/gist:d4db3993a773629f97f8
Last active February 21, 2016 12:10
Show Gist options
  • Save antishok/a20643fd3d3d3086e008 to your computer and use it in GitHub Desktop.
Save antishok/a20643fd3d3d3086e008 to your computer and use it in GitHub Desktop.
beforeShowDay: function(date) {
var enabled = disabledDates.every(function(disabledDate){
var from = new Date(disabledDate['from']);
var to = new Date(disabledDate['to']);
from.setHours(0);
from.setMinutes(0);
from.setSeconds(0);
to.setHours(23);
to.setMinutes(59);
to.setSeconds(59);
return (date < from || date > to);
});
return [enabled, '', ''];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment