如何使用Angularjs在datepicker日历中显示json数据

时间:2015-08-24 10:04:19

标签: json angularjs datepicker

我是Angularjs的新手并且不确定从哪里开始,我需要在datepicker的每个日期下显示数据(来自json)。

我准备好了日期拣选日历。

<!doctype html>
<html ng-app="720kb">
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, target-densitydpi=device-dpi" />
  <link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css">
  <link rel="stylesheet" type="text/css" href="http://720kb.github.io/csshelper/assets/ext/src/helper.css">
  <link rel="stylesheet" type="text/css" href="src/css/angular-datepicker.css">
  <title>Angularjs Datepicker</title>
</head>
<body>
  <div class="separator50"></div>
  <div class="col6 offset-left2">
    <div class="col3">
      <div class="datepicker"
      date-format="MMMM d, y"
      button-prev='<i class="fa fa-arrow-circle-left"></i>'
      button-next='<i class="fa fa-arrow-circle-right"></i>'>
      <input ng-model="date2" type="text" class="angular-datepicker-input"/>
    </div>
    Date 2 is: {{date2}}
  </div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular-route.min.js"></script>
<script type="text/javascript" src="src/js/angular-datepicker.js"></script>
<script type="text/javascript" src="assets/js/index.js"></script>
</body>
</html>

0 个答案:

没有答案