title: javascript format date from DDMMYYYY to DD/MM/YYYY
body: <p>I have a datepicker and I want to parse the date to dd/mm/yyyy when user input is ddmmyyyy.</p>
  
  <p><a href="http://i.stack.imgur.com/JUtaQ.png" rel="nofollow">Image</a></p>
  
  <p>I have add a javascript function to the input text but I don't know if I am on the right way</p>
  
  <pre><code>&lt;inputText id="input1" onchange="parseDate()"/&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function() {
           $("#input1").datepicker()   
      };
      function parseDate() {
          ??? 
      }
  &lt;script&gt;
  </code></pre>
  
  <p>Thanks</p>