I have following bootstrap datepicker:
Now, when I am deleting the 24th date from my another table, as a result, it should remove the 24th date from the date picker after the ajax call.
I have written the following code for it. However, it's not working:
$.ajax({
            type: "POST",
            url: "<?php echo VIEW_HOST_PATH;?>remove_data.php",
            data: {ch: ch, dh: dh, sp_rec: sp_rec, cartDate: 1},
            success: function(data) {
                console.log(data);
                var obj = $.parseJSON(data);
                //console.log(obj.length);
                var selectedDates = '';
                for(var i=0;i<obj.length;i++) {
                    //selectedDates = selectedDates+"'"+obj[i]+"',";
                    //$('#disc_single_datepicker_1').datepicker('setDates',[obj[i]]);
                }
                console.log(selectedDates);
                //alert(selectedDates); 
                //$('#disc_single_datepicker_1').datepicker('setDates',[data]);
                //$('#disc_single_datepicker_1').datepicker('update',selectedDates);
                display_toastr(datainfo+" record has been removed!","Remove Record",true,"right","info");
                $("#row_"+dh).fadeOut('slow');
            }, error: function() {
                alert("Something went wrong. Please contact admin!");
            }
        });
so what should I write to unset that particular date. thanks

