0

The datepicker element is not created correctly within a modal, it covers the input field and I can not visualize the dataenter image description here

html:

<div id="datepicker" class="input-append date col-md-12" >
    <input  type="text" class="form-control">
    <span class="add-on">
        <span class="arrow"></span>
        <i class="fa fa-th"></i>
    </span>
</div>

js:

<script src="{% static 'assets/plugins/bootstrapv3/js/bootstrap.min.js' %}" type="text/javascript"></script> 


$("#datepicker").datepicker({
    format: "dd/mm/yyyy",
    startDate: "01-01-2015",
    endDate: "01-01-2020",
    todayBtn: "linked",
    autoclose: true,
    todayHighlight: true,
    container: '#myModal modal-body',
    zIndex: 2048,
});
Gianmar
  • 505
  • 3
  • 13

1 Answers1

0

This is for posterity, the datepicker had to be initialized in the input label.

<input id="datepicker" type="text" class="form-control">

on the other hand I had to implement this suggestion:

Gianmar
  • 505
  • 3
  • 13