Created
September 1, 2014 14:26
-
-
Save ihsanberahim/cbf222ae12e0a91857c1 to your computer and use it in GitHub Desktop.
how to disable/enable and styling some date in the inline jquery calendar
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 datesArray = ['2/9/2014']; | |
(function() { | |
$( "#datepicker" ).datepicker({ | |
beforeShowDay: function (date) | |
{ | |
var theday = date.getDate() +'/'+ (date.getMonth()+1) +'/'+ date.getFullYear(); | |
var thedates = datesArray.join('|'); | |
var bookedDateStyle = [true]; | |
if(thedates.indexOf(theday)!=-1) | |
{ | |
bookedDateStyle = [false]; | |
bookedDateStyle.push("bookedDate"); | |
} | |
return bookedDateStyle; | |
} | |
}); | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment