find max and min income date by condition date input