0

I'm not able to restrict max and min date in angular-datepicker angular-datepicker link

<div date-picker="start" min-date="Date string | Expression" max-
date="Date string | Expression"></div>

What will be valid expression to achieve it?

Below is the list of expression I tried.

  1. min-date="2018-03-12 | date : 'yyyy-MM-dd'"

  2. min-date="2018-03-12 | 'yyyy-MM-dd'"

  3. min-date="2018-03-12 | date"

Himanshu Shekhar
  • 1,196
  • 1
  • 16
  • 35

1 Answers1

3

You need to use the angular controller for the specific scenario.

//HTML code

<div date-picker="start" min-date="minDate" max-
date="maxDate"></div>

//Controller code

$scope.minDate = new Date();
$scope.maxDate = new Date(); //as per your expectation