jquery timepicker cdnjs cloudflare does not working

0 votes

i am using jQuery to plugin in and want to create a input field that i could select time. How come it doesn't work?

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>

this is the js i have used. i have also used bootstrap js n jquery

$(document).ready(function () {
    $('#timepicker').timepicker();
});

this is the code i used in my javascript file

this is my input field

<div class="form-group col-md">
    <input class="form-control" id='timepicker' type='text' name='timepicker' />
</div>

when i checked the console I'm getting the error that

jquery-3.5.1.slim.min.js:2 Uncaught TypeError: $(...).timepicker is not a function
    at HTMLDocument.<anonymous> (appointments.js:2)
    at e (jquery-3.5.1.slim.min.js:2)
    at t (jquery-3.5.1.slim.min.js:2)

May 31, 2022 in JQuery by Edureka
• 13,690 points
1,474 views

1 answer to this question.

0 votes

jQuery Timepicker can parse the most used time representations allowing you and your users to enter time using their prefered way for writing it.

To use jQuery Timepicker you'll need to include two files: jquery.timepicker.min.js and jquery.timepicker.min.css. Then, assuming you have an <input> element in your document, with class timepicker, you can use the code on the right (or the code below, if you are reading on mobile) to initialize the plugin.

The plugin is available from different sources, choose the one that goes better with your project!

npm

npm i jquery-timepicker

Bower

bower install jquery-timepicker-wvega --save

If you need to know more about Cloud Computing, We recommend joining Cloud Computing Training today.

answered Jun 1, 2022 by Edureka
• 13,690 points

Related Questions In JQuery

0 votes
1 answer

Error:jQuery scrollTop not working in Chrome but working in Firefox

Hello @kartik, If your CSS html element has the following overflow markup, scrollTop will ...READ MORE

answered May 29, 2020 in JQuery by Niroj
• 82,840 points
14,831 views
0 votes
1 answer

jQuery slideDown() animation not working

Your p element is already displayed when you enter ...READ MORE

answered Jun 16, 2022 in JQuery by rajatha
• 7,680 points
1,448 views
0 votes
1 answer

jQuery Animate not working on background-color property

The background color animate can be performed ...READ MORE

answered Jun 16, 2022 in JQuery by rajatha
• 7,680 points
707 views
0 votes
1 answer

jQuery on page load event not working

You should be passing .on("load") on the window instead ...READ MORE

answered Jun 20, 2022 in JQuery by rajatha
• 7,680 points
1,832 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,520 points
1,315 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Hello, Use the following script tag in your ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,840 points
15,710 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,840 points
23,295 views
0 votes
1 answer

How to make Bootstrap popover Appear/Disappear on hover instead of click?

Hello @kartik, Set the trigger option of the popover to hover instead ...READ MORE

answered May 12, 2020 in JQuery by Niroj
• 82,840 points
3,311 views
0 votes
1 answer

Why does jQuery or a DOM method such as getElementById not find the element?

At the moment the script is executed, ...READ MORE

answered Jun 1, 2022 in JQuery by Edureka
• 13,690 points
1,934 views
0 votes
1 answer

addClass and removeClass in jQuery - not removing class

What happens is that your close button ...READ MORE

answered Jun 2, 2022 in JQuery by Edureka
• 13,690 points
10,822 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP