I have some jQuery that I need to execute onFocus for the datepicker which will block out days.
Here's the jQuery that I'm running on the page:
<script>
function disableDays(selector,days,min) {
var $ = jQuery;
var daysToDisable = days; // [5, 6] // Sat & Sun
function disableSpecificWeekDays(date) {
var day = date.getDay();
for (i = 0; i < daysToDisable.length; i++) {
if ($.inArray(day, daysToDisable) != -1) {
return [false];
}
}
return [true];
}
$(selector).datepicker('option', 'beforeShowDay', disableSpecificWeekDays);
$(selector).datepicker('option', 'minDate', min);
}
</script>
I need to execute this function on focus for Field ID 75
How do I add this to the datepicker input?
onfocus='(disableDays('#input_2_75',[5,6],'+4d');):"