Ensure start date is earlier than enddate. #857