title: Pandas date index loc between dates throws KeyError when edge date is not in dataframe
body: <p>I can't understand why I'm getting KeyError: Timestamp('...') when using loc on date index.</p>
  <p>With given df: <code>dtypes are datetime64[ns], int, int</code>, <strong><code>DATE1 is index</code></strong></p>
  <pre><code>            DATE1    VALUE2  VALUE3
  2021-08-20 00:00:00      11     424
  2021-08-21 00:00:00      22     424
  2021-08-22 00:00:00      33     424
  2021-08-23 00:00:00      44     242
  </code></pre>
  <p>I'm trying to use loc on index like this:</p>
  <pre><code>start_date = date(2021-08-20)
  end_date = date(2021-08-23)
  df = df.loc[start_date:end_date]
  </code></pre>
  <p>and this is working fine. I'm getting 4 records. <strong>However</strong> when I do this:</p>
  <pre><code>start_date = date(2021-08-20)
  end_date = date(2021-08-24) #end_date is higher than values in dataframe
  df = df.loc[start_date:end_date]
  </code></pre>
  <p>I'm getting KeyError: <code>KeyError: Timestamp('2021-08-24 00:00:00')</code>. Could someone point me how to resolve this?</p>