无法在角度js中打开datetimepicker

时间:2018-01-30 11:10:46

标签: angularjs datetimepicker

下面是打开datetimepicker日历的html代码

 <div class="input-group date"
data-datetimepicker="datetimepicker"
 data-date-format="YYYY/MM/DD hh:mm AM/PM"  >
 <input id="mypicker" class="form-control" type="text"
placeholder=""ng-model="note.remainder"/> <span
class="input-group-addon"> <span id="mypicker"
class="glyphicon glyphicon-calendar"  > </span>
</span>
</div>

css link ::

<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/css/datepicker.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>   

app.js ::

var app = angular.module('ToDoApp',
    [ 'ui.router', 'ui.bootstrap', 'ngSanitize' ,'ui.bootstrap.datepicker']);

2 个答案:

答案 0 :(得分:0)

对于正在运行的uib-datepicker,您需要以下脚本:

  • angular.js
  • ui-bootstrap.js(或仅适用于datepicker的脚本)

和/或

  • UI-自举-tpls.js

根据您的问题,您没有包含任何内容。

答案 1 :(得分:0)

根据input type使用date作为text代替html5

<input type='date'>