How to get ClockPicker for Bootstrap (Plugin) to appear in a Bootstrap Modal pop up form?

Grace

Here is the link to ClockPicker for Bootstrap: http://www.jqueryrain.com/?B83aD_dg

It works perfectly; however, when I try to use it to fill in a text-input in a Bootstrap modal pop up, the clock appears behind the modal pop up. How can I get the clock picker to appear in (or in front of) the modal pop up instead?

Here is an image of what happens:

enter image description here

I've tried changing the z-index of the div to be in front; I've also tried changing the z-index of every element in clockpicker.css to be in front (for example: z-index: 1120). However, all this does is make the clock disappear.

<div class="modal fade appointment-modal"
     id="appointment-modal"
     tabindex="-1"
     role="dialog"
     aria-labelledby="myModalLabel"
     aria-hidden="true">

<div class="modal-dialog tutors-modal">
    <div class="modal-content tutors-modal">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title">Appointment Scheduler</h4>
        </div>
        <div class="modal-body" style="height: 575px; left: 2.5%;">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">     
                        <div class="alert alert-danger"><span class="glyphicon glyphicon-alert"></span>
                            <form role="form" action="/portal/make-appointment/" method="post" id="appointment_form" class="form-horizontal">
                                <div class="col-lg-6">

                                    <div class="input-group clockpicker" id = "clockpicker" style="padding: 6px; padding-bottom: 20px;">
                                        <input type="text" class="form-control" id = "time" name="time" value="08:00">
                                        <span class="input-group-addon">
                                            <span class="glyphicon glyphicon-time"></span>
                                        </span>
                                    </div>
                                    <script type="text/javascript">
                                        var input = $('#time');
                                        input.clockpicker({
                                            autoclose: true
                                        });
                                    </script>
                                    <input type="submit" name="submit" id="submit" value="Schedule Appointment" class="btn btn-info pull-right">
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal-footer">
        </div>
    </div>
</div>

Catalin MUNTEANU

I made a JSFiddle with your code.

As I suspected the problem is that the z-index of the modal is higher than the z-index of the clock-modal.

All you have to do in order to fix this is add this in your CSS:

.clockpicker-popover {
    z-index: 999999;
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to get ClockPicker for Bootstrap (Plugin) to appear in a Bootstrap Modal pop up form?

From Dev

bootstrap modal pop not popping up

From Dev

Using Bootstrap Clockpicker in modal dialog

From Dev

How to GET values from Bootstrap Modal form?

From Dev

Pop up Bootstrap modal on success AJAX call

From Dev

video not working in bootstrap modal pop up on firefox

From Dev

Tab index with bootstrap pop up modal menu

From Dev

Randomly show a pop up window bootstrap modal

From Dev

Pop up Bootstrap modal on success AJAX call

From Dev

Bootstrap modal pop up not working in IE and Mozilla

From Dev

how to setup bootstrap form in a modal

From Dev

How to do Modal Bootstrap appear on bottom

From Dev

How to update correct list item in unordered list on bootstrap modal pop up submission

From Dev

Simple Confirmation Modal/Pop-up -MVC 5/Bootstrap 3

From Dev

Bootstrap modal in Rails 4 doesn't pop up

From Dev

Simple Confirmation Modal/Pop-up -MVC 5/Bootstrap 3

From Dev

Bootstrap Modal Window pop-up after 5sec

From Dev

Showing Bootstrap Modal Pop-up on clicking Asp Button control

From Dev

Jquery datepicker in Bootstrap modal pop up not working as expected

From Dev

How to make pop-up for error bootstrap?

From Dev

Get form values and pass it to Bootstrap modal on Submit

From Dev

Get form values and pass it to Bootstrap modal on Submit

From Dev

Bootstrap Modal not showing up

From Dev

Bootstrap Modal not popping up

From Dev

How to make a pop to appear gradually using jquery and bootstrap?

From Dev

Bootstrap modal won't appear

From Dev

Bootstrap Modal doesn't appear

From Dev

Angular-Bootstrap, Can't get modal to appear

From Dev

How to style form inside modal with Bootstrap 3

Related Related

HotTag

Archive