I have a php array
that returns a available day of the week already converted in number this 1,2,5 for (Monday, Thursday, Friday).
Now i have function like this:
<script>
$(document).ready(function() {
$('#dataritiro').datepicker({
minDate: 0,
beforeShowDay: function(date) {
var day = date.getDay();
return [(day != 1 && day != 2)];
}
});
});
</script>
But i have trouble to use it with the provided array. I need that days available is dynamically fetched from the array that I pass trough var days = <?php echo $days; ?>