title: passing javascript options in HTML
body: <p>I am using ruby gem <a href="https://github.com/Nerian/bootstrap-datepicker-rails" rel="nofollow">bootstrap-datepicker-rails</a> in my Rails-4 application, to draw a form for taking <code>from_date</code> and <code>till_date</code> as input as following. The beauty of this code is no javascript is needed as that in encoded in this gem's code.</p>
  
  <pre><code>&lt;div class=" input-daterange" id="datepicker" data-provide='datepicker'&gt;
    &lt;label&gt;From Date&lt;/label&gt;
    &lt;input type="text" class="form-control" name="from_date" id="from_date"&gt;
  
    &lt;label&gt;Till Date&lt;/label&gt;
    &lt;input type="text" class="form-control" name="till_date" id="till_date"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>By default it takes format as “mm/dd/yyyy”, I want to change it to “yyyy-dd-mm”, Is it possible to do this by passing this in html options only and not using any javascript for it. I tried following and some other permutations of these, but of-course they didn't work.</p>
  
  <pre><code>&lt;div class=" input-daterange" id="datepicker" data-provide='datepicker' options='format:"yyyy-mm-dd"'&gt;
  
  &lt;div class="row input-daterange" id="datepicker" data-provide='datepicker' format="yyyy-mm-dd" &gt;
  </code></pre>
  
  <p>Please let me know if this is possible to do and how.</p>