DAR-2508 shifting dates to max or min level if it exceeds range