Created
December 7, 2014 04:40
-
-
Save zachskaggs/561ced9d29542e1d6f23 to your computer and use it in GitHub Desktop.
Holidat blocker
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
var array = ["2014-12-24","2014-12-25", | |
"2015-07-04","2015-11-26","2015-12-24","2015-12-25", | |
"2016-07-04","2016-11-24","2016-12-24","2016-12-25", | |
"2017-07-04","2017-11-23","2017-12-24","2017-12-25", | |
"2018-07-04","2018-11-22","2018-12-24","2018-12-25", | |
"2019-07-04","2019-11-28","2019-12-24","2019-12-25", | |
"2020-07-04","2020-11-26","2020-12-24","2020-12-25", | |
"2021-07-04","2021-11-25","2021-12-24","2021-12-25", | |
"2022-07-04","2022-11-24","2022-12-24","2022-12-25", | |
"2023-07-04","2023-11-23","2023-12-24","2023-12-25", | |
"2024-07-04","2024-11-28","2024-12-24","2024-12-25", | |
"2025-07-04","2025-11-27","2025-12-24","2025-12-25", | |
"2026-07-04","2026-11-26","2026-12-24","2026-12-25", | |
"2027-07-04","2027-11-25","2027-12-24","2027-12-25", | |
"2028-07-04","2028-11-23","2028-12-24","2028-12-25", | |
"2029-07-04","2029-11-22","2029-12-24","2029-12-25", | |
"2030-07-04","2030-11-28","2030-12-24","2030-12-25", | |
"2031-07-04","2031-11-27","2031-12-24","2031-12-25", | |
"2032-07-04","2032-11-25","2032-12-24","2032-12-25", | |
"2033-07-04","2033-11-24","2033-12-24","2033-12-25", | |
"2034-07-04","2034-11-23","2034-12-24","2034-12-25", | |
"2035-07-04","2035-11-22","2035-12-24","2035-12-25", | |
"2036-07-04","2036-11-27","2036-12-24","2036-12-25", | |
"2037-07-04","2037-11-26","2037-12-24","2037-12-25", | |
"2038-07-04","2038-11-25","2038-12-24","2038-12-25", | |
"2039-07-04","2039-11-24","2039-12-24","2039-12-25", | |
"2040-07-04","2040-11-22","2040-12-24","2040-12-25", | |
] | |
$('.ninja-forms-datepicker').datepicker({ | |
minDate: 0, | |
beforeShowDay: function(date){ | |
var string = jQuery.datepicker.formatDate('yy-mm-dd', date); | |
return [ array.indexOf(string) == -1 ] | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment