title: Rails Bootstrap X-editable
body: <p>I've got Bootstrap x-editable working in my Rails app for text and numbers.
  But, I haven't been able to get a date to work.</p>
  
  <p>I'm using gem 'bootstrap-editable-rails'.</p>
  
  <p>This is the view code:</p>
  
  <pre><code>&lt;a href="#" class="xeditable_date" data-type="date" data-pk="1" data-resource="task" data-name="eststartdate" data-url="/tasks/&lt;%= task.id %&gt;" &gt;
  &lt;%= task.eststartdate %&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>This is the coffee script:</p>
  
  <pre><code>$(".xeditable_date").editable
    placement: 'bottom'
    format: 'yyyy-mm-dd'
    datepicker:
      weekStart: 1
  </code></pre>
  
  <p>Console error:</p>
  
  <pre><code>Uncaught TypeError: Cannot call method 'parseFormat' of undefined   application.js:33351
  $.extend.initPicker application.js:33351
  Date application.js:33324
  $.fn.editableutils.createInput application.js:30030
  Editable.init application.js:30580
  Editable application.js:30566
  (anonymous function) application.js:31087
  jQuery.extend.each application.js:649
  jQuery.fn.jQuery.each application.js:271
  $.fn.editable application.js:31081
  (anonymous function) application.js:56013
  fire application.js:1038
  self.fireWith application.js:1149
  jQuery.extend.ready application.js:434
  completed application.js:104
  </code></pre>
  
  <p>I'm using PG and the <code>eststartdate</code> is type date.  So, I believe the date format 'yyyy-mm-dd' is correct.  An example of the field displays as <code>2013-08-26</code>.</p>
  
  <p>Thanks for the help!</p>
  
  <p>UPDATE1</p>
  
  <p>I thought I would try something different.  But, it displays a text field and not the date picker:</p>
  
  <p>View code:  </p>
  
  <pre><code>&lt;a href="#" class="xeditable datepicker" data-type="text" data-pk="1" data-resource="task" data-name="eststartdate" data-url="/tasks/&lt;%= task.id %&gt;" &gt;
  &lt;%= task.eststartdate ? task.eststartdate : "Select Date" %&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>Coffeescript:</p>
  
  <pre><code>$(".xeditable").editable
    placement: 'bottom'
  </code></pre>