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 in Web Development by gaurav
• 18,960 points
31 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 by rajatha
• 7,440 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 in Web Development by gaurav
• 18,960 points
1,222 views
0 votes
0 answers
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 in Web Development by gaurav
• 18,960 points
98 views
0 votes
1 answer

jquery timepicker cdnjs.cloudflare does not working

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

answered Jun 1 in JQuery by Edureka
• 13,640 points
184 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
332 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,780 points
9,366 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,780 points
16,583 views
0 votes
1 answer

JQuery - Change event using element by name

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

answered Jun 28 in Web Development by rajatha
• 7,440 points
67 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 in Web Development by rajatha
• 7,440 points
44 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