I use Pickadate.js and JQuery Form Plugin. I have date and time pickers seperately. What I want to do is to disable times in timepicker according to value of datepicker.  So, I am trying to get the JSON data into picker.set("disable", [ ]);. I can console.log the plain text but it remains aimless.
I tried a lot and have come across these solutions in that question. But I couldn't launch them. (I adapted pickadate functions and classes to pickatime's.)
// Javascript
$(document).ready(function() {
  $("input").click(function() {
    $(".datepicker").pickadate({
      format: 'yyyy-mm-dd',
      formatSubmit: 'yyyy-mm-dd',
      min: true,
      max: false
    });
    var $input = $(".timepicker").pickatime({
      format: 'HH:i',
      formatSubmit: 'HH:i',
      formatLabel: 'HH:i'
    });
    $('.datepicker').change(function() {
      $('#form').ajaxSubmit({
        target: '#check_result',
        url: 'check.php',
        success: function showResponse(responseText, $form) {
          var picker = $input.pickatime('picker');
          picker.set("disable", [
            console.log(responseText)
          ]);
        }
      });
      return false;
    });
  });
});
// PHP (check.php)
<?php
// Database connection done.
$date = mysqli_real_escape_string($con, $_POST['date']);
$match_query = mysqli_query($con, "SELECT * FROM booking WHERE DATE(time) = '$date'");
$disabled_times = array();
if ($result = $match_query) {
 while ($row = mysqli_fetch_assoc($result)) {
  $disabled_times[] = $row['time'];
 }
 mysqli_free_result($result);
}
echo implode($disabled_times);
?>