Better defaulting for Time

We have a requirement to do better defaulting for time e.g. When the
user types in 10, he should not have to type in .00 am that shold be the
default. When the user enters 12, default to pm; now this is a more
logocal case for us, but may not be for other; I am open for any other
options suggestiosn to achieve this.