title: Why does changing from 'date_select' to 'date_field' effect the use of strftime to display an input time in Rails?
body: <p>I have a form used for creating guides. An important component is the dates. An admin can create new guides which are then displayed on the homepage (if it is within the date range).</p>
  
  <p>To create a user friendly CMS I changed the form from <code>date_select</code> to <code>date_field</code> (using <code>bootstrap_form_for</code>). </p>
  
  <pre><code>&lt;%= f.date_select :date_starting %&gt;
  &lt;%= f.date_select :date_ending %&gt;
  </code></pre>
  
  <p>However this causes an error when displaying the time of the guides:</p>
  
  <pre><code>undefined method `strftime' for nil:NilClass
  </code></pre>
  
  <p>Extracted source code:</p>
  
  <pre><code>&lt;h4 class='guide'&gt;From &lt;%= guide.date_starting.strftime("%a %b #{guide.date_starting.day.ordinalize}") %&gt; to &lt;%= guide.date_ending.strftime("%a %b #{guide.date_starting.day.ordinalize}") %&gt;&lt;/h4&gt;
  </code></pre>
  
  <p>Why should the use of <code>strftime</code> not work with <code>date_select</code> and <code>date_field</code> form submissions the same? After all, I am only making use of the same information input in both. </p>