119
rated 0 times
[
124]
[
5]
/ answers: 1 / hits: 5385
/ 11 Years ago, thu, january 9, 2014, 12:00:00
I have one array for disabled dates and another for dates to be highlighted. Is there a way to code this?
e.g.:
beforeShowDay: function(date){
var unavilble = jQuery.datepicker.formatDate('yy/mm/dd', date);
var newstring = [ arrayable.indexOf(unavilble) == -1 ];
return newstring;
},
2nd array:
var datet = ['2014/01/19', '2014/01/20'];
//tips are optional but good to have
var tips = ['some description','some other description'];
function highlightDays(date) {
for (var i = 0; i < datet.length; i++) {
if (new Date(datet[i]).toString() == date.toString()) {
return [true, 'highlight', tips[i]];
}
}
return [true, ''];
}
beforeShowDay: highlightDays,
More From » jquery