Block invalid time

Apr 18, 2012 at 12:30 PM

I'm looking for a way to block text insertion of not valid time. If a type "5" as hour, followed by a "6", i'd like to see only "5".

How can I implement this functionality?

Thanks in advance. Matteo