title: Bootstrap show datepicker on modal
body: <p>I am trying to use datepicker that show on modal. But my code isn't work. I already use <strong>.datepicker{z-index:1151;}</strong> and it's not working too, can someone help me to show datepicker on bootstrap modal ? Thanks</p>
  
  <p>And this is my code,</p>
  
  <p>Button (in edit.php) :</p>
  
  <pre><code>&lt;a href="#detail" id="custId" data-toggle="modal" data-id="'.$row["id"].'" class="btn btn-success btn-sm" role="button" title="Detail"&gt;&lt;i class="glyphicon glyphicon-eye-open"&gt;&lt;/i&gt;&lt;/a&gt;
  </code></pre>
  
  <p>Modal (in index.php) :</p>
  
  <pre><code>&lt;div class="modal fade" id="edit" role="dialog"&gt;
      &lt;div class="modal-dialog" role="document"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                  &lt;h4 class="modal-title"&gt;Edit Costumer&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;div class="fetched-data"&gt;&lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-danger" data-dismiss="modal"&gt;Keluar&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS for modal (in index.php) :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $('#edit').on('show.bs.modal', function (e) {
              var rowid = $(e.relatedTarget).data('id');
              //menggunakan fungsi ajax untuk pengambilan data
              $.ajax({
                  type : 'post',
                  url : 'edit.php',
                  data :  'rowid='+ rowid,
                  success : function(data){
                  $('.fetched-data').html(data);//menampilkan data ke dalam modal
                  }
              });
           });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>JS for Datepicker (in index.php) :</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
      $(function(){
          $('.input-group.date').datepicker({
              calendarWeeks: true,
              todayHighlight: true,
              autoclose: true
          });  
      });
  &lt;/script&gt;
  </code></pre>