Pass the date from jQuery Datepicker

Pass the date from jQuery Datepicker

Hi there,

I am very new to jQuery and this is my first post on the forum.

I've got a problem which will look rather silly probably to most of the people here however I couldn't find an answer to it yet.

I wish to use jQuery datepicker :
  <script>
  $(document).ready(function() {
    $("#datepicker").datepicker();
  });
  </script> 

  
<div type="text" id="datepicker"></div>

Which looks to me as the coolest, shortest markup for such a thing I've ever seen.

My problem is that I don't really know how to put the selcted date into a text box <input> and to have it there in dd/mm/yyyy format?

I want to pass then  this data with other info from the form to MySql database.

Could anyone help me with that?

Many thanks.