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

Commit de23f96

Browse files
committed
Solve issue #209
1 parent 95d4196 commit de23f96

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/js/angular-datepicker.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
'<a href="javascript:void(0)" ng-repeat="px in prevMonthDays" class="_720kb-datepicker-calendar-day _720kb-datepicker-disabled">',
106106
'{{px}}',
107107
'</a>',
108-
'<a href="javascript:void(0)" ng-repeat="item in days" ng-click="setDatepickerDay(item)" ng-class="{\'_720kb-datepicker-active\': day === item, \'_720kb-datepicker-disabled\': !isSelectableMinDate(year + \'/\' + monthNumber + \'/\' + item ) || !isSelectableMaxDate(year + \'/\' + monthNumber + \'/\' + item) || !isSelectableDate(monthNumber, year, item)}" class="_720kb-datepicker-calendar-day">',
108+
'<a href="javascript:void(0)" ng-repeat="item in days" ng-click="setDatepickerDay(item)" ng-class="{\'_720kb-datepicker-active\': selectedDay === item && selectedMonth === monthNumber, \'_720kb-datepicker-disabled\': !isSelectableMinDate(year + \'/\' + monthNumber + \'/\' + item ) || !isSelectableMaxDate(year + \'/\' + monthNumber + \'/\' + item) || !isSelectableDate(monthNumber, year, item)}" class="_720kb-datepicker-calendar-day">',
109109
'{{item}}',
110110
'</a>',
111111
'<a href="javascript:void(0)" ng-repeat="nx in nextMonthDays" class="_720kb-datepicker-calendar-day _720kb-datepicker-disabled">',
@@ -552,6 +552,9 @@
552552
$scope.isSelectableMinDate($scope.year + '/' + $scope.monthNumber + '/' + day)) {
553553

554554
$scope.day = Number(day);
555+
$scope.selectedDay = $scope.day;
556+
$scope.selectedMonth = $scope.monthNumber;
557+
555558
setInputValue();
556559

557560
if (attr.hasOwnProperty('dateRefocus')) {

0 commit comments

Comments
 (0)