clockpicker icon indicating copy to clipboard operation
clockpicker copied to clipboard

Can't change time value when control inside Bootstrap's "Modal" window (IE 10)

Open ya-github-new opened this issue 11 years ago • 11 comments

When Clockpicker placed inside "Modal" control, user can't change time value. Dropdown with dial shows correct, user can select new hour and minute, selected values are show in dropdown, But, after click on 'Done' button - nothing changes in input text. Error occurs only in IE10. UPD: it's possible to change editor's value, when 'autoclose' option set to 'true'. If 'autoclose' option not set (or set to 'false' explicit), user can't change editor's value

ya-github-new avatar Sep 19 '14 11:09 ya-github-new

I have the same issue on Firefox 34.0 and Chrome 35 installed on Ubuntu 14 When Clockpicker placed inside bootstrap modal and autoclose set to true it's work. But if autoclose is set to false, when I click on the done button the "done" function is never called as if I had clicked outside the clickpicker to close it.

here is a fiddle to show it http://jsfiddle.net/9p61p888/

CedCannes avatar Jan 07 '15 17:01 CedCannes

I have the same problem with Chrome 40 on Ubuntu 14. Anybody got a fix?

ksidibe avatar Feb 28 '15 00:02 ksidibe

Facing the same issue with Chrome 36+, Firefox and IE10. See this stack overflow question http://stackoverflow.com/questions/28814155/using-bootstrap-clockpicker-in-modal-dialog/28815535#28815535

ChandanNadig avatar Mar 03 '15 06:03 ChandanNadig

@ChandanNadig, Indeed, that's what I ended up doing too (setting autoclose to true). And that works. Thanks a lot. I hope this issue is addressed in the next release because, in order to provide a consistant User Experience, I had to go through my app and set autoclose to true everywhere else.

ksidibe avatar Mar 03 '15 10:03 ksidibe

Hi guys, I found a temporary solution for this issue, although it would disable the functionality to close the clockpicker on clicking on other elements outside the popover

look for this code in your plugin:

// Hide when clicking or tabbing on any element except the clock, input and addon
$doc.on('click.clockpicker.' + this.id + ' focusin.clockpicker.' + this.id, function(e){
     var target = $(e.target);
     if (target.closest(self.popover).length === 0 &&
         target.closest(self.addon).length === 0 &&
     target.closest(self.input).length === 0) {
             //self.hide(); - >> comment this out
     }
});

markerictamo avatar Aug 05 '15 04:08 markerictamo

Hi guys, I'm facing same problem but with different case. I have selecting twelvehour option set to true. When you select time it only sets to 'pm' like 12:00pm and not for 12:00am

I have updated the @CedCannes fiddle here: https://jsfiddle.net/9p61p888/3/

dipaksawant avatar Aug 28 '15 09:08 dipaksawant

Hi folks, I too have the same issue with 12 hour clock. Values are not getting updated after clicking 'Done' button. If I set to autoclose:true, then it is not waiting for the user to press 'AM' or 'PM' and by default it is updating 'input' with 'PM'.

I am using Chrome version 43 in Ubuntu.

govindrajg avatar Dec 30 '15 05:12 govindrajg

Fixed this issue and added more options with this new code: https://github.com/diracleo/bootstrap-clockpicker

diracleo avatar Mar 28 '17 17:03 diracleo

That's a neat work. Thanks @diracleo

the94air avatar Aug 27 '17 13:08 the94air

@diracleo Your script doesn't work with the default scripts options. the AM PM appears by default. Thanks

amirhos712 avatar Mar 27 '18 18:03 amirhos712

open the modal with javascript , example-> your id modal is :

CristianJojoaCabrera avatar Aug 30 '18 02:08 CristianJojoaCabrera