title: Cypress does not select a date on calendar
body: <p>I want to test a calendar using cypress but it is not possible to select the date I need or any date, the ideal is a dynamic code, where I can enter number of days and it will select the correct number.</p>
  <p>I am using this code and I am getting a error saying <em>'Cannot read property 'includes' of undefined'</em></p>
  <pre><code>  let date = new Date()
    date.setDate(date.getDate() + 5)
    let futureDay = date.getDate()
    console.log(futureDay)
    let futureMonth = date.toLocaleString('default', { month: 'long' })
    cy.get('.flatpickr-current-month')
      .invoke('attr', 'flatpickr-monthDropdown-month')
      .then(dateAttribute =&gt; {
        if (!dateAttribute.includes(futureMonth)) {
          cy.get('.flatpickr-next-month').click()
        } else {
          cy.get('.dayContainer')
            .contains(futureDay)
            .click()
        }
      })
  </code></pre>
  <p>I am able to add unique attributes in the elements if necessary (I tried and still it did not worked).
  I was well tried a more simples code as:</p>
  <pre><code>  cy.get('#inception_date').click()
    cy.get('.flatpickr-days &gt; .dayContainer',)
      .contains('17')
      .click({force: true})
    cy.get('#inception_date')
      .invoke('prop', 'value')
      .should('contain', '2021-07-17')
  </code></pre>
  <p>and in this code I get an error of <em>Timed out retrying after 4000ms: expected '2021-07-27' to include '2021-07-17'</em> because it does not select the any date, it continues to be the date of today.</p>
  <p>I am attaching 2 images if the DOM, maybe it can help to figure out what is the issue on my code.
  <a href="https://i.stack.imgur.com/bQbhi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bQbhi.png" alt="imput field" /></a></p>
  <p><a href="https://i.stack.imgur.com/lrCmD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lrCmD.png" alt="enter image description here" /></a></p>