我在包含输入的模态下使用JQuery Datepicker定位时遇到问题

时间:2018-12-09 03:38:28

标签: jquery datepicker

我遇到了一个jQuery Datepicker问题,该问题在我的html网站的一个实例中的模式下出现。

我在页面上的模态中使用多个Datepicker。所有模态都可以正常工作,但是其中之一中的Datepicker出现在模态下。它位于引导导航栏中。

我尝试更改输入的z索引,但没有成功。

<form id='form1a' style='width:494px' class="modal-content animate" method="post" action="todoEntry_processing.php">


  <div class="container-modal">

    <label>Date</label>
    <input style='width: 100%; height:44px; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; box-sizing: border-box; background:rgb(250, 255, 189)' name='dater' id='datepicker20' form='form1a' autocomplete='off' />

    <button class="button-modal-input" style="width:140px" type="submit" onclick>Submit</button>
    <br/><br/><br/>
    <button class="button-modal-input" style="width:140px; background-color: #f44336" type="button" onclick="document.getElementById('id01a').style.display='none'" class="cancelbtn">Cancel</button>

  </div>

</form>

所有Datepickers都单独调用;

          $( function() {
              $( "#datepicker18" ).datepicker({ dateFormat: 'dd-mm-yy'}).val();

          } );

          $( function() {
              $( "#datepicker19" ).datepicker({ dateFormat: 'dd-mm-yy'}).val();

          } );
          $( function() {
              $( "#datepicker20" ).datepicker({ dateFormat: 'dd-mm-yy'}).val();

          } );

为了测试该问题,我在有问题的模态上方直接添加了一个输入,并且Datepicker在此模态下工作正常;

            <label>Date</label>
            <input class="form-control modal-general-input "  name='dater' id='datepicker19' form='form3' required='required' autocomplete='off' />

0 个答案:

没有答案
相关问题