0

I am using simple angularjs input type = date for displaying date picker.

How to disable the previous dates means dates before the current dates.

html is like

<input class="form-control" type="date" name="sevadate" ng-model="sevadate" min-date="" placeholder="yyyy-MM-dd" ng-required="true" /> //What do i write in min-date..
Keshav Desai
  • 23
  • 1
  • 9
  • 1
    Possible duplicate of [Disable certain dates from html5 datepicker](http://stackoverflow.com/questions/17182544/disable-certain-dates-from-html5-datepicker) – Sajeetharan Apr 12 '17 at 08:24
  • its html5. i want to use angular date picker. how to specify min date value? – Keshav Desai Apr 12 '17 at 08:45

1 Answers1

0

change min-date="" to min="2017-12-30"

or you can do something like this min="{{minDate | date:'yyyy-MM-dd'}} " and on the controller

  $scope.minDate = new Date();

<input class="form-control" type="date" name="sevadate" ng-model="sevadate" min="2017-04-12" placeholder="yyyy-MM-dd" ng-required="true" /> //What do i write in min-date..
rrrm93
  • 386
  • 4
  • 11