title: How can I find the end date of the calendar control in selenium java
body: <p>This calendar has a date range of 11 days from the current date, how can I check if the date that is entered through the script is between this range and select it else if that entered date mentioned in script not in that date range then current date should be clicked.</p>
  <p>There is a class that can be used to get the current date (class=&quot;owl-dt-calendar-cell-content owl-dt-calendar-cell-today&quot;)<a href="https://i.stack.imgur.com/kcSsA.png" rel="nofollow noreferrer">calendar</a></p>
  <pre><code>public void selectRequiredOn(String date)
  {
      requiredOnClick.click();
      currentDate.getText();
      
      if(currentDate.equals(date))
      {
          currentDate.click();
      }
  </code></pre>