BUG: fix datetimeindex repr
- [x] closes #53470 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Slightly modified `_is_dates_only` in `DatetimeIndex` as mentioned in the issue.

I added some remarks about this PR in: https://github.com/pandas-dev/pandas/issues/53470

Unfortunately, I do not know much about DatetimeArrays to be to help. @topper-123 could you take a look whenever you get the chance? @Simar-B, I added some sanity checks of my own in https://github.com/Simar-B/pandas/pull/1
 Thanks @Simar-B 