title: Can't select date with Capybara?
body: <p>I have a model called Club, which has the following fields:</p>
  
  <pre><code>name (string)
  creation (date)
  </code></pre>
  
  <p>In my form, however, instead of showing creation, I want to show Foundation Date in the label, so I have this in my View:</p>
  
  <pre><code> &lt;div class="fields"&gt;
      &lt;%= f.label :name %&gt;
      &lt;%= f.text_field :name %&gt;
      &lt;%= f.label :creation, 'Foundation date' %&gt;
      &lt;%= f.date_select :creation %&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>And in my test I have the following:</p>
  
  <pre><code> scenario "User creates a club with a creation date" do
      sign_in
      visit new_club_path
      fill_in 'Name', :with =&gt; 'Unió Esportiva'
      select '1952/01/01', :from =&gt; 'Creation'
    end
  </code></pre>
  
  <p>And I get:</p>
  
  <pre><code> Capybara::ElementNotFound:
     Unable to find select box "Creation"
  </code></pre>
  
  <p>The rendered HTML looks like this (for the select boxes):</p>
  
  <pre><code>&lt;select id="club_creation_1i" name="club[creation(1i)]"&gt;
  ...
  &lt;/select&gt;
  &lt;select id="club_creation_2i" name="club[creation(2i)]"&gt;
  ...
  &lt;/select&gt;
  &lt;select id="club_creation_3i" name="club[creation(3i)]"&gt;
  ...
  &lt;/select&gt;
  </code></pre>
  
  <p>What am I missing? According to <a href="https://stackoverflow.com/questions/6729786/how-to-select-date-from-a-select-box-using-capybara-in-rails-3">this answer</a> I don't need to select each box independently:</p>
  
  <p><strong>EDIT</strong>: I have to say that I tried using 'Creation' because when trying to use the label 'Foundation date' as:</p>
  
  <pre><code>select '1952/01/01', :from =&gt; 'Foundation date'
  </code></pre>
  
  <p>I would get the exact same error. However, if I select the boxes independently, such as:</p>
  
  <pre><code>select '1952', :from =&gt; 'club_creation_1i'
  select '1', :from =&gt; 'club_creation_2i'
  select '1', :from =&gt; 'club_creation_3i'
  </code></pre>
  
  <p>It works.</p>