fix issue where both AM and PM hour were selected at same time