Backport PR #37023 on branch 1.1.x (REGR: fix bug in DatetimeIndex slicing with irregular or unsorted indices)
Backport PR #37023: REGR: fix bug in DatetimeIndex slicing with irregular or unsorted indices