jQuery timepicker example

I've bought this template  
http://www.keenthemes.com/preview/metronic/theme/templates/admin4/components_pickers.html

Please scroll down to "Time Pickers" section. You see how the timepicker works.

I've attached my example but when I click on the textbox, the time picker doesn't popup. What am I missing?

This is how I want it to look

Timepicker.pngTimepicker.html
LVL 8
CamilliaAsked:
Who is Participating?

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

x
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.

F PCommented:
Please right click on your page anywhere and then click

"Inspect Element"

Once done, click on the "Console" button and screen print and attach to the post here please. Usually this happens when there is another problem.
CamilliaAuthor Commented:
I have the example attached in my original post. The code. It's timepicker.html

You can see the libraries and that textbox is not popping up. There's error in the console but I don't how to fix it
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

F PCommented:
I'm sorry, the picture you posted has the time picker in the middle of the screen underneath the textbox, and it doesn't show me the information I need to see in the console of the Developer Tools like I posted.
chaauCommented:
Looks like the timepicker.js wants the css.

Add this to your html:
   
<link rel="stylesheet" type="text/css" href="http://jonthornton.github.io/jquery-timepicker/jquery.timepicker.css" />

Open in new window

(or download the css and copy the required classes to your stylesheet
CamilliaAuthor Commented:
Here, I've attached the html file again. It's a small code. I'm thinking the jQuery reference might not be correct.
Timepicker.html
CamilliaAuthor Commented:
Chaau, just saw your msg, let me try
F PCommented:
The problem is with the parameters you're passing. First, where did you find minutestep? I can't seem to find it in the documentation. Second, they both need to be surrounded in single quotes, minutestep and autoclose, like this:

$(document).ready(function(){
     $('#mondayfrom').timepicker({
                  'autoclose': true,
                  'minuteStep': 5
             });
});

Open in new window

CamilliaAuthor Commented:
I got the parameters from that template link I posted in my original post.

Still not working. This the entire code

<html>
<head>
    <link rel="stylesheet" type="text/css" href="http://jonthornton.github.io/jquery-timepicker/jquery.timepicker.css" />
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timepicker/1.6.11/jquery.timepicker.min.js"></script>


  <script>
      
$(document).ready(function(){
     $('#mondayfrom').timepicker({
                  'autoclose': true,
                  'minuteStep': 5
             });
});
      
       
    </script>
</head>

<body>
<input type="text" id="mondayfrom">
</body>

</html>

Open in new window

chaauCommented:
Try Ctrl+F5. It works for me
chaauCommented:
Also, use proper protocol name:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

Open in new window

CamilliaAuthor Commented:
Thanks, it works now as far as popping up but howcome it's not in increments of 5 mins and doesn't look like the example in my first post (that link I have).

Mine now looks like this

How it looks like
chaauCommented:
This is exactly what the author's timepicker looks like. Now, all you need to do is to apply the stylesheets from the template you have bought
CamilliaAuthor Commented:
ok, thanks, trying to find the stylesheets in that template.

But still, I have it as 5 mins but mine shows as 30 mins increments.  I don't know why.

This is the entire code

<html>
<head>
    <link rel="stylesheet" type="text/css" href="http://jonthornton.github.io/jquery-timepicker/jquery.timepicker.css" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timepicker/1.6.11/jquery.timepicker.min.js"></script>


  <script>
      
$(document).ready(function(){
     $('#mondayfrom').timepicker({
                  'autoclose': true,
                  'minuteStep': 5
             });
});
      
       
    </script>
</head>

<body>
<input type="text" id="mondayfrom">
</body>

</html>

Open in new window

chaauCommented:
I guess it is all these css's:
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css">
<link href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css">
<link href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css">
<link href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link rel="stylesheet" type="text/css" href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/clockface/css/clockface.css"/>
<link rel="stylesheet" type="text/css" href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css"/>
<link rel="stylesheet" type="text/css" href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css"/>
<link rel="stylesheet" type="text/css" href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap-colorpicker/css/colorpicker.css"/>
<link rel="stylesheet" type="text/css" href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css"/>
<link rel="stylesheet" type="text/css" href="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css"/>
<!-- END PAGE LEVEL STYLES -->
<!-- BEGIN THEME STYLES -->
<link href="http://www.keenthemes.com/preview/metronic/theme/assets/global/css/components-rounded.css" id="style_components" rel="stylesheet" type="text/css"/>
<link href="http://www.keenthemes.com/preview/metronic/theme/assets/global/css/plugins.css" rel="stylesheet" type="text/css"/>
<link href="http://www.keenthemes.com/preview/metronic/theme/assets/admin/layout4/css/layout.css" rel="stylesheet" type="text/css"/>
<link id="style_color" href="http://www.keenthemes.com/preview/metronic/theme/assets/admin/layout4/css/themes/light.css" rel="stylesheet" type="text/css"/>
<link href="http://www.keenthemes.com/preview/metronic/theme/assets/admin/layout4/css/custom.css" rel="stylesheet" type="text/css"/>
<!-- END THEME STYLES -->

Open in new window

chaauCommented:
try adding this class to the input element:
class="form-control timepicker timepicker-no-seconds"

Open in new window

CamilliaAuthor Commented:
I'll plug in all the CSS. Yes, I'll add those 2 css classes.


How about the increment of 5 mins. That template has and it shows it as 5 mins. How come mine isn't showing it as 5 mins?

 $('.timepicker-no-seconds').timepicker({
                autoclose: true,
                minuteStep: 5
            });

Open in new window

chaauCommented:
Just found this link on the template page:
<script type="text/javascript" src="../../assets/global/plugins/bootstrap-timepicker/js/bootstrap-timepicker.min.js"></script>

Open in new window

Looks like the author uses a different timepicker:
/*! bootstrap-timepicker v0.2.5 
* http://jdewit.github.com/bootstrap-timepicker 
* Copyright (c) 2013 Joris de Wit 
* MIT License 
*/

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
CamilliaAuthor Commented:
oh, so i need to reference that time picker.

OK, I'll create another example with that reference.


Yours works as well. I just need it in increments of 5 mins.

Thanks for your  help.
chaauCommented:
It wasn't mine, BTW, it was the one you have referenced to in your original html
CamilliaAuthor Commented:
yeah :) thanks.
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
jQuery

From novice to tech pro — start learning today.