Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 41b9d35

Browse files
committed
date-disabled-dates eval array fixed
1 parent 0637af1 commit 41b9d35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/js/angular-datepicker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
, dateFormat = attr.dateFormat
151151
//, dateMinLimit
152152
//, dateMaxLimit
153-
, dateDisabledDates = $scope.dateDisabledDates
153+
, dateDisabledDates = $scope.$eval($scope.dateDisabledDates)
154154
, date = new Date()
155155
//, currentDay = $filter('date')(date, 'd')
156156
, currentMonthNumber = $filter('date')(date, 'M')
@@ -557,6 +557,7 @@
557557
dateDisabledDates.length > 0) {
558558

559559
for (i; i <= dateDisabledDates.length; i += 1) {
560+
560561
if (new Date(dateDisabledDates[i]).getTime() === new Date(monthNumber + '/' + day + '/' + year).getTime()) {
561562

562563
return false;

0 commit comments

Comments
 (0)