默认为今年 var date = new Date; $scope.year = date.getFullYear(); //年份减 $scope.yearPrev = function(){ $scope.year -- ; if($scope.year == 1999){ showTips('超出选择范围!'); $scope.year ++; } } //年份加 $scope.yearNext = function(){ $scope.year ++; if($scope.year == 2031){ showTips('超出选择范围!'); $scope.year --; } };