日期选择器不能正常工作js

时间:2016-01-22 13:00:37

标签: angularjs datepicker

我正在使用此datepicker示例,链接为http://jsfiddle.net/raving/k0po5q44/

我没有得到这个例子中的日期选择器。我已经包含了所有外部文件,但我得到了不同的日期选择器。

Html代码

  <form name="myform">
<label>
    Birth Date
    <span style="color:red" ng-show="myform.birthdate.$error.pattern">(1 Jan 2013)</span>
</label>
<input
    type="date"
    id="test"
    name="birthdate"
    ng-model="birthDate"
    popup="d MMM yyyy"
    options="dateOptions"
    opened="opened"
    custom-datepicker/>
  < /form>
   < hr/>

 <pre>
birthDate = {{birthDate}}
< /pre>

<script type="text/ng-template" id="custom-datepicker.html">
  <div class="form-inline enhanced-datepicker">
    <label>
        <input
            type="text"
            id="{{id}}"
            name="{{name}}"
            ng-model="ngModel"
            datepicker-popup="{{popup}}"
            datepicker-options="{{options}}"
            date-disabled="{{dateDisabled}}"
            min="{{min}}"
            max="{{max}}"
            open="opened"
            ng-pattern="/^(?:[1-9]|1\d|2\d|3[0-1]) (?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (?:1|2)(?:\d{3})$/gim"/>
        <span class="btn"><i class="icon-calendar"></i></span>
     < /label>
  < /div>
<  /script>

0 个答案:

没有答案
相关问题