【问题标题】:Bootstrap datepicker inside table cell not showing properly表格单元格内的引导日期选择器未正确显示
【发布时间】:2019-10-15 12:07:53
【问题描述】:

我正在使用引导程序日期选择器,除了在表格单元格中之外,它的渲染效果很好,如下图所示。有谁知道如何解决这个问题?

<td>
   <div class="input-group date" id="gebdatum">
      <div class="input-group-prepend datepickerbutton">
         <span class="input-group-text"><i class="far fa-calendar"></i></span>
      </div>
      <input id="@Html.IdFor(model => model.GeboortedatumFormatted)" 
          name="@Html.NameFor(model => model.GeboortedatumFormatted)" 
          type="text" 
          value="@Model.GeboortedatumFormatted" 
          class="form-control" 
          autocomplete="off"/>
       @Html.ValidationMessageFor(model => model.GeboortedatumFormatted, "", new { @class = "text-danger" })
   </div>
</td>

【问题讨论】:

  • 你是否对这个日期选择器应用了任何自定义 css?,除了 bootstrap 放在它上面的东西
  • 我不知道,我在想可能有一些来自表格的css应用于它。但很难说,因为我无法检查 datepicker 元素,因为当您点击离开时它会消失。

标签: javascript jquery css bootstrap-datetimepicker


【解决方案1】:

如果您将属性 debug: true 添加到您的配置中,选择器将保持打开状态,允许您检查元素并覆盖导致渲染错误的 css 属性。

【讨论】:

    猜你喜欢
    • 2023-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多