title: Cannot display selected date using Bootstrap-datepicker-rails as "dd/mm/yyyy"
body: <p>I am attempting to put the bootstrap-datepicker on date input fields in my application.   After the date is selected from the calendar, I want the date to display as 'dd/mm/yyyy'.  The  Dates are saved in the table (sqlite) in 'yyyy-mm-dd' format.</p>
  
  <p>I have done the following:</p>
  
  <p>In the application.js file, I have:</p>
  
  <pre><code>   //= require jquery
     //= require jquery_ujs
     //= require jquery-ui
     //= require turbolinks
     //= require bootstrap-datepicker
     //= require_tree .
  </code></pre>
  
  <p>In the application.html.erb file, I have:</p>
  
  <pre><code>    &lt;%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' =&gt; true %&gt;
      &lt;%= javascript_include_tag 'application', 'data-turbolinks-track' =&gt; true %&gt;
  </code></pre>
  
  <p>In the custom.css.scss, I have:</p>
  
  <pre><code>  @import "bootstrap-sprockets";
    @import "bootstrap";
  </code></pre>
  
  <p>In the related .js file, I have:</p>
  
  <pre><code>   $(document).on("focus", "[data-behaviour~='datepicker']", function(e){
     $(this).datepicker({"format": "dd-mm-yy", "weekStart": 1, autoclose": true, "language": 'en-GB'})});
  </code></pre>
  
  <p>I have also tried this code in the application.js file - with no luck.</p>
  
  <p>In the related form, I have:</p>
  
  <pre><code>    &lt;a&gt; Start Date/time: &lt;/a&gt;
      &lt;%= f.text_field :start_date, 'data-behaviour' =&gt; 'datepicker', size:10 %&gt;
  </code></pre>
  
  <p>Result: I get a calendar from which I can select a date, but the date shows up in the default format of "mm/dd/yyyy".</p>
  
  <p>Other tries:   I have put the script in the form, but that has also not worked.</p>
  
  <p>Any help will be immensely appreciated.   </p>
  
  <p>Thanking you in advance,</p>