1

I am using angular 1.0.8. I want to use angular ui datepicker. I want to set minimum date to yesterday.

I had tried min-date option like "min-date='-1d'" but it's not working.

Does anyone have this issue? I need help in setting min-date option.

Thanks and regards,

Jay Patel

3
  • 1
    Which version of angular-ui? Prior to 0.11.0 the field was called min. Commented Aug 22, 2014 at 11:24
  • 2
    Then you should be using min instead of min-date as indicated in the changelog: github.com/angular-ui/bootstrap/blob/master/CHANGELOG.md Commented Aug 22, 2014 at 11:28
  • No worries, I had the same issue last week. It's a good idea to take a look in a project's changelog when something does not work like it is described in the documentation. Commented Aug 22, 2014 at 11:31

2 Answers 2

2

I am using angular.ui 0.10.0 version and it's having "min" instead of "min-date". I changed "min-date" to "min" as per comment and it's working properly

Sign up to request clarification or add additional context in comments.

Comments

-1

In your Controller you can write ,Use the latest version of date picker from Angular UI it will work , its an example of date of Birth selection

min-date="'01/01/1901'"  max-date="maxDate"

$scope.toggleMax = function() { $scope.maxDate = $scope.maxDate ? null : new Date(); }; $scope.toggleMax();

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.