Jquery pickatime Drop down window not closing after on change event

0 votes

I am using JQuery Time picker. On selection of time, the dop-down window which displays the time has to close, but it doesnot.

<h:inputText id="selectTime" value="00:00" />

$('#selectTime').pickatime({
    format: 'HH:i',
    disable: [
        [0, 0]
    ]
})
$('#selectTime').on('change', function() {
    $(this).hide();
})

For the above on change event, the input text gets hide but not the Time Picker Drop down. I understad, as I am using this, it will hide the text box. But what is the correct way to clode the Time Picker after time is being selected.

Aug 2, 2022 in Web Development by gaurav
• 23,260 points
446 views

1 answer to this question.

0 votes

Maybe your input element falls within label element. You must use a container to separate events of picker root element into label events.

Create a blank div with sample id "root-picker-outlet":

<div id="root-picker-outlet"></div>

Initialize picker:

$('.timepicker').pickatime({
  container: '#root-picker-outlet'
})
answered Aug 2, 2022 by rajatha
• 7,680 points

Related Questions In Web Development

0 votes
0 answers

scroll up and down a div on button click using jquery

I am trying to add a feature ...READ MORE

Jun 29, 2022 in Web Development by gaurav
• 23,260 points
7,739 views
0 votes
0 answers
0 votes
0 answers

jQuery counter, counting down after reaching the number

I'm using a jQuery code for showing ...READ MORE

Jul 26, 2022 in Web Development by gaurav
• 23,260 points
1,309 views
0 votes
1 answer

Jquery trigger only on small window

You have the :hover pseudo on your CSS. While ...READ MORE

answered Aug 4, 2022 in Web Development by rajatha
• 7,680 points
796 views
0 votes
1 answer

jquery timepicker cdnjs.cloudflare does not working

jQuery Timepicker can parse the most used ...READ MORE

answered Jun 1, 2022 in JQuery by Edureka
• 13,670 points
1,262 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,510 points
1,112 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,880 points
14,858 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,880 points
22,793 views
0 votes
1 answer

JQuery - Change event using element by name

How to trigger a event with event ...READ MORE

answered Jun 28, 2022 in Web Development by rajatha
• 7,680 points
2,627 views
0 votes
1 answer

"JQuery not defined" throwing error after installing angular-slickgrid

1. Your CDN-hosted jQuery might be blocked If ...READ MORE

answered Jul 25, 2022 in Web Development by rajatha
• 7,680 points
1,118 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