I have the following code:
$(document).ready(function(){
$(".datepicker").each(function() {
$(this).datepicker({
beforeShowDay: function(date){ return [$(this).parent().find("span.days").html(), ""] },
});
});
});
With this body code...
<div>
<span class="days">(date.getDay() == 1 || date.getDay() == 4)</span>
<input type="text" class="datepicker">
</div>
<div>
<span class="days">(date.getDay() == 2 || date.getDay() == 5)</span>
<input type="text" class="datepicker">
</div>
What I want to be able to do is have each datepicker have different days pickable.
The way i'm trying to do this (putting the varying part of the beforeShowDay code in a span) may not be the most elegant so feel free to take my code apart and change it if necessary.