Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. $scope.infData = [];
  2. $scope.addInf = function() {
  3. if ($scope.infData.length < 4) {
  4. $scope.infData.push({});
  5. }
  6. };
  7.  
  8. <div class="col-xs-7 col-md-3"
  9. ng-repeat="d in infData | limitTo: 4"
  10. ng-value="d.value"
  11. ng-class="{'md-align-top-left': $index==1}">
  12. <md-input-container flex>
  13. <label>infant D.O.B</label>
  14. <md-datepicker
  15. onkeydown="return false"
  16. name="myDate{{$index}}"
  17. ng-model="inf[$index==1].date"
  18. md-hide-icons="all"
  19. ng-required="true"
  20. md-current-view="year"
  21. md-min-date="ctrl.minDate"
  22. md-max-date="ctrl.maxDate"
  23. md-open-on-focus="true"
  24. ng-messages>
  25. </md-datepicker>
  26.  
  27. if ($scope.inf.dateString = moment($scope.inf.date).format("YYYY-MM-DD")) {
  28. $scope.list.push(this.inf.dateString);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement