title: Getting selected date from calendar date picker
body: <p>I need help with getting the selected date from calendar date picker. Currently I can select the date(from...to...) and place it into textbox. But I cannot get the value to put into PHP variable.</p>
  
  <pre><code>&lt;head&gt;
  
  
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;jQuery UI Datepicker - Select a Date Range&lt;/title&gt;
      &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /&gt;
      &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
      &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" href="/resources/demos/style.css" /&gt;
      &lt;script&gt;
          $(function() {
              $( "#from" ).datepicker({
                  defaultDate: "+1w",
                  changeMonth: true,
                  numberOfMonths: 3,
                  onClose: function( selectedDate ) {
                      $( "#to" ).datepicker( "option", "minDate", selectedDate );
                  }
              });
              $( "#to" ).datepicker({
                  defaultDate: "+1w",
                  changeMonth: true,
                  numberOfMonths: 3,
                  onClose: function( selectedDate ) {
                      $( "#from" ).datepicker( "option", "maxDate", selectedDate );
                  }
              });
  
  
          });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  
          &lt;label for="from"&gt;From&lt;/label&gt;
          &lt;input type="text" id="from" name="from" /&gt;
  
  
          &lt;label for="to"&gt;to&lt;/label&gt;
          &lt;input type="text" id="to" name="to" /&gt;
  
  &lt;/body&gt;
  </code></pre>