Link to home
Start Free TrialLog in
Avatar of ambuli
ambuliFlag for United States of America

asked on

Using Jquery spinner with seconds

Hi there,
Is there a format option in Jquery spinner where I can get a seconds column as well. I tried 'HH:mm:ss' but it doesn't seem to work. Basically, I want the user to enter time in HH:MM:SS format in an input field.  Is there a better solutions.  Sorry, just learning javascript. Thank you


 $('#FromTimePickerID').spinner({
            format : 'HH:mm'
        });
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Do you mean `datetimepicker`? If so, try format:'H:i:s' instead.  Otherwise, provide a link to the plugin you are referring to.
Avatar of ambuli

ASKER

https://jqueryui.com/spinner/#time
This is the one I am using.
Avatar of ambuli

ASKER

something similar to the solution posted here.
http://stackoverflow.com/questions/11803946/how-to-restrict-user-input-of-24-format-time-into-input-field
$("#time").inputmask("h:s",{ "placeholder": "hh/mm" });

But this does not work.  I am getting an exception saying inputmask is not a function.
Avatar of ambuli

ASKER

The above link I posted does work.  I did not realize the solution is based on the jq plugin. inputmask.  https://github.com/RobinHerbots/jquery.inputmask
This solved my problem
ASKER CERTIFIED SOLUTION
Avatar of lenamtl
lenamtl
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial