hello, what I need is to change color some days in the datepicker and disable weekends, until now I have done the first, but I don´t know how to disable the weekens, because I can do the tho thinhs inside the fucntion before show day.
Here is my source code:
$(document).ready(function(){
var events;
$.ajax({
type: 'get',
async: false,
url: 'get_events.php',
success: function(data){
events=data;
}
});
var ev=events.split(",");
$( "#event" ).datepicker({
beforeShowDay: function(date) {
var current = $.datepicker.formatDate('yy-mm-dd', date);
return $.inArray(current, ev) == -1 ? [true, ''] : [true, 'oc_days', 'ui-state-highlight'];
},
onSelect: function(dateText,inst){
f=dateText;
alert(f);
},
});
//beforeShowDay: $.datepicker.noWeekends-> this is the line that I don´t know how to use ,
});