fix first time select day

when first time select the time-range, it could happen the end_day smaller than start_day or start_day bigger than end_day.