title: jquery datepicker won't submit inside a table
body: <p>I have a jquery datepicker which it appears won't submit when a date is chosen because it is inside a table. I suspect the table after reading the second answer here:</p>
  
  <p><a href="https://stackoverflow.com/questions/15005857/jquery-ui-datepicker-inline-submiting-form-on-click">jQuery UI Datepicker Inline - submiting form on click</a></p>
  
  <p>I have created an identical datepicker (different name) outside the table, and it will submit when a date is chosen. The form is outside the table.</p>
  
  <p>Here is the code</p>
  
  <pre><code>$(function () {
    $("#txtSantaDate").datepicker({
      changeMonth: true,
      changeYear: true,
      dateFormat: 'dd/mm/yy',
      minDate: '06/12/2014',
      maxDate: '21/12/2014',
      onSelect : function() { $(this).parent('form').submit(); }
    });
  });
  </code></pre>
  
  <p>I want the datepciker to stay in the table, but I need it to submit when a date is chosen - is there anything I can do?</p>
  
  <p>****** NEW ******</p>
  
  <p>Thanks for replies - you really wouldn't want to pick through the HTML, I have been able to pare it down to this example:</p>
  
  <pre><code>&lt;!Doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
  
      &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /&gt;
  &lt;script type="text/jscript" src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
  &lt;script type="text/jscript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" &gt;
  
    $(function () {
      $("#txtTest").datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat: 'dd/mm/yy',
        minDate: '06/12/2014',
        maxDate: '21/12/2014',
        onSelect : function() { $(this).parent('form').submit(); }
      });
    });
  
  &lt;/script&gt; 
  &lt;/head&gt;
  
  &lt;body  &gt;
  &lt;form id="frmBooking" name="frmBooking"  action="/booking/book_now.php#basecamp" METHOD="POST"&gt;
  &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;input type='text' ID='txtTest' name='txtTest' value='' size = '12' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>