Issue #23861:fix out of date range checking