今日、Bootstrap Modalにdatepickerを表示しようとすると、この問題に直面します。Datepicker:Modal(z-index)のDatepicker
私はdatepickerライブラリとしてbootstrap-datepickerを使用しています。ここ
<div class="form-group">
<label for="message-text" class="control-label">Start Date</label>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" class="form-control pull-right datepicker" id="datepicker2" name="start_date">
</div>
</div>
そして、私のDatePickerのスクリプトです:私はすでにzIndexOffsetを使用しますが、それは働いていない
$('#datepicker2').datepicker({
autoclose: true,
format: 'yyyy-mm-dd',
zIndexOffset: 10000
});
、カレンダーはまだモーダル後ろ示すが
は、ここに私のモーダルフォームです。
誰も解決策を提案できますか?
ありがとうございます。
(クラスモーダル・オープンは身体に追加)適用されているモーダル内の日付ピッカーを追加し、あなたはオプション 'container'を使用してみましたか? – visola
@visolaまだ、コンテナオプションはどこに置くべきですか? –
これはオプションです:https://bootstrap-datepicker.readthedocs.io/en/latest/options.html#container – visola