Init time correctly if startDate and endDate were selected.