2

Bootstrap Modal Dialog ボックス (Bootstrap 3.0) 内で Bootstrap Datepicker を使用しようとしています。Chrome ブラウザーを使用している場合、日付ピッカーはまったく表示されませんが、以下のコードに示すように確認ステートメントまたは警告ステートメントが挿入された場合にのみ、Internet Explorer で適切に表示されます。

   var GetDate = function () {
        BootstrapDialog.show({
            title: "Go To Date",
            message: '<div><input id="StartDate" type="text" /></div',
            draggable: true,
            closable: false,
            cssClass: 'login-dialog',
            buttons: [{
                label: "Return Date",
                action: function (dialogRef) {
                    alert($("#StartDate").val().toLocaleString());
                    dialogRef.close();
                }
            }]
        });

        // The code only works on IE9, IE10 and IE11 with the following line
        confirm();

        var dp = $("#StartDate");
        dp.datepicker({
            format: "dd/mm/yyyy",
            todayBtn: "linked",
            autoclose: true,
            todayHighlight: true,
            language: "en"
        });
    }

    <input id="Button1" type="button" value="button" onclick="GetDate();" />

なぜこれが起こっているのか、この問題を解決する方法を教えてもらえますか?

4

1 に答える 1

1

このCSSの行はあなたを助けるはずです:

.datepicker.dropdown-menu { height:245px; width:210px; **z-index: 2000 !important; text-      indent:0px !important;**}

あなたにも役立つことを願っています...

于 2014-07-08T07:42:17.277 に答える