用户使用angularJs和js输入日期后更改日期格式

时间:2018-05-08 05:49:36

标签: javascript angularjs input datepicker

<input class="cal" ng-model="mycalendar" mobiscroll-calendar="settings"
       mobiscroll-instance="demo" placeholder="Please Select..." />

enter image description here

我有一个上面的输入框。一旦用户从选择器中选择日期,我需要1960-04-30 00:00:00000格式的日期

1 个答案:

答案 0 :(得分:0)

<div ng-controller="MyCtrl">
    <!-- this list is for assure, that two way binding works -->
    List of Tags:
  <ul>
        <li data-ng-repeat="tag in post.tags">{{tag.tag}}</li>
    </ul>
  <br>
  Select Tags: <!-- selected items are not binded to the model -->
    <select multiple ui-select2 class="form-control" data-ng-model="selectedTags" >
        <option data-ng-repeat="tag in post.tags" value="{{tag._id}}" text="">{{tag.tag}}</option>
    </select>
</div>
相关问题