0

When the bootstrap-datepicker is used inside a modal window, there is no decoration on hover events (days, buttons...) and current date is not highlighted.

It works fine when the datepicker is not inside a modal window.

How can I fix that?

No decoration

Edit :

in my view "Details.cshtml":

<div class="form-group">
@Html.LabelFor(model => model.ImpactForm.DateFinTestPilote, new { @class = "control-label col-md-4" })
<div class="col-md-8">
@Html.EditorFor(model => model.ImpactForm.DateFinTestPilote)
@Html.ValidationMessageFor(model => model.ImpactForm.DateDebutTestPilote)
</div>
</div>

I have an editor template for Nullable DateTime type :

@inherits System.Web.Mvc.WebViewPage<System.Nullable<DateTime>>
@if (Model.HasValue)
{
    @Html.TextBox("", (Model.Value.ToShortDateString()), new { @class = "datepicker form-control" })
}
else
{
    @Html.TextBox("", null, new { @class = "datepicker form-control" })
}

bootstrap.css and bootstrap.js are loaded in _Layout.cshtml.

datepicker.css, bootstrap-datepicker.js and bootstrap-datepicker.fr.js are loaded in Details.cshtml

4

1 回答 1

0

尝试在视图本身而不是布局中加载引导程序的 CSS,我认为在您的问题中,其他 CSS 正在修改引导程序的 css,因此在您打开模式的视图中加载引导程序的 css。

谢谢!!

于 2014-08-11T12:24:48.727 回答