Home Forums Feature Requests Block days datepicker Reply To: Block days datepicker

  • The following jQuery snippet will block all days except Friday (I’m using it for a week-ending form).

    You could try returning the day of the week (in this case 5) or the date as a PHP variable from an ACF custom field. shows examples of formatting for specific dates.

    jQuery(document).ready(function() {
    	$datepicker = jQuery('.rdsn-week-ending .hasDatepicker');
    	$datepicker.datepicker( 'option', {
    		beforeShowDay: function(date) {
            	if (date.getDay() == 5) {
                        return [true, ''];
                    } else {
                        return [false, ''];