Fix selected date when time picker goes over the midnight.