Created
May 9, 2018 20:31
-
-
Save dangrossman/041f797fd13ed957de11071eac74cca7 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
isInvalidDate: function(arg) { | |
if (arg.day == 0 || arg.day() == 6) return true; | |
var thisMonth = arg._d.getMonth() + 1; // Months are 0 based | |
if (thisMonth < 10) { | |
thisMonth = "0" + thisMonth; // Leading 0 | |
} | |
var thisDate = arg._d.getDate(); | |
if (thisDate < 10) { | |
thisDate = "0" + thisDate; // Leading 0 | |
} | |
var thisYear = arg._d.getYear() + 1900; // Years are 1900 based | |
var thisCompare = thisMonth + "/" + thisDate + "/" + thisYear; | |
console.log(thisCompare); | |
if ($.inArray(thisCompare, disabledArr) != -1) { | |
return true; //arg._pf = {userInvalidated: true}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment