angular 架构表单日期选择器

angular schema form datepicker

我是使用 Angular JS 的新手,如果这是一个基本问题,请原谅我。我在使用带有 Angular 架构表单 (http://schemaform.io) 的日期选择器添加时遇到问题 我已按照日期选择器 github 页面上的说明进行操作,但我就是无法获得在我的页面上显示的日期选择器。这是我一直在使用的代码片段。任何人都可以帮助或建议我犯的任何错误吗?

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Unilever Data Centre Site Survey</title>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css" />
<script type="text/javascript" src="bower_components/angular/angular.min.js"></script>
<script type="text/javascript" src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script type="text/javascript" src="bower_components/tv4/tv4.js"></script>
<script type="text/javascript" src="bower_components/objectpath/lib/ObjectPath.js"></script>
<script type="text/javascript" src="bower_components/angular-schema-form/dist/schema-form.min.js"></script>
<script type="text/javascript" src="bower_components/angular-schema-form/dist/bootstrap-decorator.min.js"></script>
<script type="text/javascript" src="bower_components/datepicker/bootstrap-datepicker.min.js"></script>
<script type="text/jscript" src="bower_components/jquery-2.1.4.min.js"></script>
<script type="text/jscript" src="bower_components/pickadate.js-master/lib/picker.js"></script>
<script type="text/jscript" src="bower_components/pickadate.js-master/lib/picker.date.js"></script>
<link rel="stylesheet" href="bower_components/pickadate.js-master/lib/themes/default.css"> </link>
<link rel="stylesheet" href="bower_components/pickadate.js-master/lib/themes/default.date.css"> </link>
</head>


 <body ng-app="test" ng-controller="TestCtrl">
   
 <nav class="navbar navbar-default"> </nav>
  <div style="width:950px;" class="container-fluid">
   
    <div ng-controller="TestCtrl">
    <form name="test" sf-schema="schema" sf-form="form" sf-model="model" ng-submit="onSubmit(test,modelData)">
 </form>
 
  <h3>Model</h3>
     <div>{{prettyModel}}</div>



<script>
angular.module('test',['schemaForm']).controller('TestCtrl', function($scope,$http){
  
  
  
   $scope.schema = {
  "type": "object",
  "properties": {
  
  
  "birthDate": {
      "title": "Bday",
      "type": "string",
      "format": "date"
    },
    
    
    
   $scope.form = [ 
   
{
    "key": "birthDate",
    "minDate": "1995-09-01",
    "maxDate": new Date(),
    "format": "yyyy-mm-dd"
  },​
     
     
     $scope.model = {};
  
   $scope.$watch('model', function(value){
            if (value) {
              $scope.prettyModel = JSON.stringify(value, undefined, 2);
            }
          }, true);


  
  
})
    </script>
 
 
 
 </div>

  </body>

它不起作用,因为缺少 Textalk/angular-schema-form-datepicker。

您需要安装 angular-schema-form-datepicker

https://github.com/Textalk/angular-schema-form-datepicker