TempusDominus Bootstrap4混合了多个实例的多个配置

时间:2018-09-20 15:52:11

标签: configuration tempus-dominus-datetimepicker

如果我使用TempusDominus Bootstrap4的2个不同实例使用不同的配置,则结果是两个实例的混合UNEXPECTED新配置

这是示例代码:

<div class="container">
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <div class="input-group date" id="datetimepicker1" data-target-input="nearest">
                    <input type="text" class="form-control datetimepicker-input" data-target="#datetimepicker1"/>
                    <div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
                        <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



<label for="Periodo" class="control-label labelFiltro">Periodo</label>

<div class="input-group date" id="Periodo" data-target-input="nearest">
  <input type="text" class="form-control datetimepicker-input" data-target="#Periodo" />
  <div class="input-group-append" data-target="#Periodo" data-toggle="datetimepicker">
    <div class="input-group-text"><i class="fa fa-calendar"></i></div>
  </div>
</div>

 $(function() {
   $('#datetimepicker1').datetimepicker({   useCurrent: false, format: 'MMMM YYYY'});
    $('#Periodo').datetimepicker({ useCurrent: false, format: 'L'});
 });

See this link for fiddle

我希望第一个实例向我显示一个月历,第二个实例向我显示一个日历。

似乎是个错误...

0 个答案:

没有答案