Angular UI date-picker min Date is not working

2019-07-26 17:15发布

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

2条回答
迷人小祖宗
2楼-- · 2019-07-26 17:57

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

查看更多
祖国的老花朵
3楼-- · 2019-07-26 18:07

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();

查看更多
登录 后发表回答