Prevent unwanted input in the input field used for timepicker

Hi there,
I am using the datetimepicker ( to get a time duration input.
I actually wanted to get a time duration input from the user( ex, 2 min 30 sec... etc).  I decided to use this datetimepicker.
But in the input user should be able to type in valid numbers for secs, minutes and hour only.  Here, I was able to type in anything,.  Is there a way to do this or other input controls that would give me this behaviors.

       var CallDuration = document.createElement("input"); = "minCallDurationID";
       CallDuration.type = "text";

            format : 'HH:mm:ss',
            formatTime : 'HH:mm:ss',
            datepicker : false

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
if the user types in 2 minutes 90 seconds does it evaluate to 3 minutes 30 seconds?
try setting a `mask`:
            format : 'HH:mm:ss',
            formatTime : 'HH:mm:ss',
            datepicker : false

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ambuliAuthor Commented:
Sorry for not getting back to you on time David.  No, I didn't want user to enter 90.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.