这是我的html代码,对于第二种输入类型,没有图标,我的错误在哪里? 谢谢。

  <div> <div id="datetimepicker" class="input-append date"> <label> Start : </label> <input type="text" value="" name="date1"></input> <span class="add-on"> <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> </span> </div> <div id="datetimepicker" class="input-append date"> <label> End : </label> <input type="text" value="" name="date2"></input> <span class="add-on"> <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> </span> </div> </div> <script type="text/javascript"> $('#datetimepicker').datetimepicker({ format : 'dd/MM/yyyy hh:mm:ss' }); </script> 

===============>>#1 票数:1

ID 必须是唯一的-给它们都提供相同的类,例如datetimepicker

$('.datetimepicker').datetimepicker({
    format : 'dd/MM/yyyy hh:mm:ss'
});

  ask by OzkanCiftci translate from so

未解决问题?本站智能推荐: