JQuery Datepicker Blackout Termine

add_action('frm_date_field_js', 'limit_my_date_field'); function limit_my_date_field($field_id){ if($field_id == 'field_jk8k8s'){ //change jk8k8s to the key of your date field //get all the entries for a date field in another form global $wpdb; $sql = "SELECT meta_value FROM wp_frm_item_metas WHERE field_id = 1132"; $get_field_dates = $wpdb->get_results($sql); $date_array = array(); foreach($get_field_dates as $key=>$value){ $date_array[] = date('m/d/Y',strtotime($value->meta_value)); } //echo ',beforeShowDay: function(){return ' .implode(', ', $date_array). ';}'; echo ',beforeShowDay: function(){var dates = ["' .implode('","', $get_field_dates). '"]; if (dates.indexOf("' .$date_array. '") > -1){return false;}}'; } else { echo ',beforeShowDay: null'; } } 

Klar fehlt mir etwas in der function. Ich bin relativ neu in PHP, also entschuldige mich. Was kann getan werden, um mein Datenarray im Datepicker zu deaktivieren?

Solutions Collecting From Web of "JQuery Datepicker Blackout Termine"