title: bootstrap datepicker setDate format dd/mm/yyyy
body: <p>I have to set the date in my datepicker in dd/mm/yyyy format. Whet I'm trying to do, with Javascript is this:</p>
  
  <pre><code>  var year = 2014;
    var month = 5;
    var day = 10;
  
    var realDate = new Date(year, month - 1, day); // months are 0-based!
  
    $('#MainContent_txtDataConsegna').datepicker({ dateFormat: 'dd/mm/yyyy' }); // format to show
    $('#MainContent_txtDataConsegna').datepicker('setDate', realDate);
  </code></pre>
  
  <p>the problem is that the value inside my datepicker is always in format mm/dd/yyyy. Where is the problem??</p>
  
  <p>Here the definition datepicker and datepicker options:</p>
  
  <pre><code>   &lt;div class="input-group date"&gt;
         &lt;asp:TextBox runat="server" ID="txtDataOrdine" class="form-control" onBlur="CalcolaTotaliTestata('txtDataOrdine')"&gt;&lt;/asp:TextBox&gt;
         &lt;span class="input-group-addon"&gt;&lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;/span&gt;
      &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
     $('.input-group.date').datepicker({
         todayBtn: "linked",
         language: "it",
         autoclose: true,
         todayHighlight: true,
         dateFormat: 'dd/mm/yyyy' 
     });
  &lt;/script&gt;
  </code></pre>