vendredi 8 juillet 2016

Datepicker : Datepicker on Modal (z-index)

I face this problem today when I try to show datepicker on Bootstrap Modal.

I'm using bootstrap-datepicker as datepicker library.

Here is my modal form :

<div class="form-group">
     <label for="message-text" class="control-label">Start Date</label>
          <div class="input-group date">
               <div class="input-group-addon">
                   <i class="fa fa-calendar"></i>
               </div>
               <input type="text" class="form-control pull-right datepicker" id="datepicker2" name="start_date">
           </div>
</div>

And here is my datepicker script :

$('#datepicker2').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd',
        zIndexOffset: 10000
    });

I already using zIndexOffset but it's not working, the calendar still shown behind the modal.

Can anyone suggest the solution ?

Thank you.

Aucun commentaire:

Enregistrer un commentaire