title: Date picker in c#/selenium
body: <p>I have a date cell in a calendar control on my site with the following code</p>
  
  <pre><code>&lt;td class=calendar-day" is="null"&gt;&lt;a id="8-29" class="calendar-day-link" data-date="2016-08-29" aria-selected="false" title="August 29,2016" is="null"&gt;
  </code></pre>
  
  <p>I need a method where i specify a string eg "8-21" and it then cycles through all the values in the calendar and select the one that matches "8-21" and clicks</p>
  
  <p>This is the method i tried which failed</p>
  
  <pre><code>IWebElement option = DriverContext.Driver.FindElement(By.ClassName("calendar-day-‌​link"), 5);
  List&lt;IWebElement&gt; Links = new List&lt;IWebElement&gt;(DriverContext.Driver.FindElements(By.Class‌​Name("calendar-day-l‌​ink"), 5));
      for (int k = 0; k &lt; Links.Count; k++)
      {
          if (Links[k].Text == date)
          {
              option = Links[k];
          }
      }
  option.Click();
  </code></pre>