Send a date in the database from the calendar datepicker UI using ajax

Send a date in the database from the calendar datepicker UI using ajax

Hi,
Please, tell me how can I send a date in the database  from the calendar datepicker UI using AJAX?
I have this HTML:
  1. <div id="datepicker"></div>
  2. <form method="post" id="myform" name="myform">
  3.     <input id="input" name="input" type="text">
  4. </form>

And this JAVASCRIPT:
  1. jQuery(document).ready(function() {
  2.         $( "#datepicker").datepicker({
  3.             dateFormat: 'dd/mm/yy',
  4.             altField: '#input',
  5.             onSelect: function(dateText, inst) {
  6.             $.ajax({
  7.                 type: 'POST',
  8.                 url: "process.php",
  9.                 dataType: "json",
  10.                 data: dateText,
  11.                 success: function(data) {
  12.                 console.log("Done");
  13.                  }
  14.             }); }

  15.         });
  16.     });

But the date wasn't inserted into the database. 
I don't understand why?

P.S. When I try do this without AJAX everything OK.