mean-date-filter
Advanced tools
Comparing version 0.0.11 to 0.0.12
{ | ||
"name": "mean-date-filter", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Filter with start and end dates. Includes datepickers and quick select buttons.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -24,8 +24,2 @@ 'use strict'; | ||
link: function($scope, element, attrs) { | ||
$scope.$watchCollection('dates', function(dates) { | ||
$scope.dates = dates; | ||
}); | ||
$scope.$watch('mode', function(mode) { | ||
changeMode(mode, $scope.save); | ||
}); | ||
$scope.opened = { | ||
@@ -42,9 +36,9 @@ start: false, | ||
$scope.week = function() { | ||
$scope.mode = 'week'; | ||
changeMode('week', $scope.save); | ||
}; | ||
$scope.month = function() { | ||
$scope.mode = 'month'; | ||
changeMode('month', $scope.save); | ||
}; | ||
$scope.year = function() { | ||
$scope.mode = 'year'; | ||
changeMode('year', $scope.save); | ||
}; | ||
@@ -54,2 +48,3 @@ | ||
if (mode) { | ||
$scope.mode = mode; | ||
if (mode === 'year') { | ||
@@ -94,7 +89,7 @@ $scope.dates.startDate = moment(new Date()).subtract(1, 'year').toDate(); | ||
if (!$scope.dates.startDateText) { | ||
$scope.dates.startDateText = 'Start Date'; | ||
if (!$scope.startDateText) { | ||
$scope.startDateText = 'Start Date'; | ||
} | ||
if (!$scope.dates.endDateText) { | ||
$scope.dates.endDateText = 'End Date'; | ||
if (!$scope.endDateText) { | ||
$scope.endDateText = 'End Date'; | ||
} | ||
@@ -101,0 +96,0 @@ if (!$scope.weekText) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13457
253