Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 4525a7e

Browse files
authored
Merge pull request #249 from kuzma-sasha/master
added logic for opening datepicker calendar
2 parents b74a3e0 + 5383073 commit 4525a7e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎src/js/angular-datepicker.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,17 @@
415415
classHelper.add(theCalendar, '_720kb-datepicker-open');
416416
}
417417
$scope.today = new Date();
418+
$timeout(function timeoutForYears() {
419+
if ($scope.selectedDay) {
420+
$scope.year = $scope.selectedYear;
421+
$scope.monthNumber = $scope.selectedMonth;
422+
} else {
423+
$scope.year = $scope.today.getFullYear();
424+
$scope.monthNumber = $scope.today.getMonth() + 1;
425+
}
426+
$scope.month = $filter('date')(new Date($scope.year, $scope.monthNumber - 1), 'MMMM');
427+
setDaysInMonth($scope.monthNumber, $scope.year);
428+
}, 0);
418429
}
419430
, checkToggle = function checkToggle() {
420431
if (!$scope.datepickerToggle) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /