BUG: indexing regression with datetime index
The bug is already fixed on master. I have just added a unit test.

- [x] closes #34860
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
