title: Changes in the form are not saved to database
body: <p>I'm trying to add a date field to my form.</p>
  
  <p>I added bootstrap-datepicker-rails gem, all required css and javascript.</p>
  
  <p>When I choose the date in the calendar and click Save, it's not updated in the database. </p>
  
  <p>Here's the code of the form:</p>
  
  <pre><code>= simple_form_for @model
    = f.input :date_last, :required =&gt; true, 
              :input_html =&gt; { data: {behaviour: "datepicker"}}, 
              :as =&gt; :string
    = f.button :submit, 'Save', :class =&gt; 'btn btn-primary'
  </code></pre>
  
  <p>I think this might have to do with formats, but not sure where to look at.</p>
  
  <p><strong>Update</strong> </p>
  
  <p>It works when I change default format to yyyy-mm-dd (default is mm/dd/yyyy):</p>
  
  <pre><code>$('[data-behaviour~=datepicker]').datepicker({"format": "yyyy-mm-dd", "weekStart": 1, "autoclose": true});
  </code></pre>