title: Unable to click on available date using selenium ruby
body: <p>I'm not able to click on available date in the calendar. Past dates are greyed out so trying to get today's date and click on it. I have tried execute script, click() and perform() but none of them worked.</p>
  <pre><code>today_date =  Date.today.strftime('%d')
  element = @driver.find_element(:xpath,&quot;//td[contains(@class,\&quot;CalendarDay__default\&quot;)][contains(@aria-label, '#{today_date}')]&quot;)
  #@driver.execute_script(&quot;arguments[0].click;&quot;, element )
  @driver.action.move_to(ele).click(ele).perform
  </code></pre>
  <p>I also tried loop but td element is not displayed as some of elements are greyed out. Not sure how to select displayed elements?</p>
  <pre><code>today_date=  Date.today.strftime('%d')
  date_picker= @driver.find_element(:xpath,&quot;//*[contains(@class,'SingleDatePicker_picker')]&quot;)
  columns=date_picker.find_elements(:tag_name, &quot;td&quot;)
  calendar_date=columns.map(&amp;:text).reject(&amp;:empty?)
  columns.each do |col|
    # This returns true  
    puts &quot;include date: #{calendar_date.include?today_date}&quot;
  
    if calendar_date.include?today_date
      # Elemement is not displayed
      puts &quot;td displayed: #{col.displayed?}&quot;
      # Not clickable
     col.click
    end
  end
  </code></pre>
  <p>Please find html below.
  <a href="https://i.stack.imgur.com/QEbAM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QEbAM.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/XMDiG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XMDiG.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/1X4ZA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1X4ZA.png" alt="enter image description here" /></a></p>