Forked from anonymous/gist:d4db3993a773629f97f8
Last active
February 21, 2016 12:10
-
-
Save antishok/a20643fd3d3d3086e008 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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