Issue #24781:fix ending date of schedules selected