title: Empty value after form submit
body: <p>I'm facing a very weird problem regarding the dynamical setting of an input value with JQuery.</p>
  
  <p>The initial state of the targeted input is as following:</p>
  
  <pre><code>&lt;input type="text" id="birthdate" name="birthdate" value="" data-alt-value="0000-00-00" autocomplete="off" data-local-value="0000-00-00"&gt;
  </code></pre>
  
  <p>Note: The input fields are generated through the Joomla framework (may be it matters, I don't know).</p>
  
  <p>If I set the value in a regular way: </p>
  
  <pre><code>$('[name="birthdate"]').val("1986-01-21");
  </code></pre>
  
  <p>I get this result:</p>
  
  <pre><code>&lt;input type="text" id="birthdate" name="birthdate" value="" data-alt-value="1986-01-21" autocomplete="off" data-local-value="1986-01-21"&gt;
  </code></pre>
  
  <p>The value attribute is not set. So I tried this way:</p>
  
  <pre><code>$('[name="birthdate"]').attr('value', "1986-01-21");
  </code></pre>
  
  <p>which gives the expected result:</p>
  
  <pre><code>&lt;input type="text" id="birthdate" name="birthdate" value="1986-01-21" data-alt-value="1986-01-21" autocomplete="off" data-local-value="1986-01-21"&gt;
  </code></pre>
  
  <p>But for whatever reason the value is empty after the form is submitted.
  Even stranger, if I give the focus to the birthdate field (by clicking in it) then submit the form, the value is passed correctly.</p>
  
  <p>I would point out that this problem occurs only with input fields dealing with date or datetime values. </p>
  
  <p>Can someone helps me ?</p>