Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
[fix] options -> .options
Browse files Browse the repository at this point in the history
  • Loading branch information
nicieja committed Jul 4, 2014
1 parent 0f839c8 commit bece914
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "angular-mighty-datepicker",
"version": "0.0.3",
"version": "0.0.4",
"authors": [
"Krzysztof Jung <[email protected]>",
"Patryk Peas <[email protected]>"
"Patryk Peas <[email protected]>",
"Kamil Nicieja <[email protected]>"
],
"repository": "git://github.com/monterail/angular-mighty-datepicker.git",
"description": "Angular based datepicker with mighty options",
Expand Down
8 changes: 4 additions & 4 deletions build/angular-mighty-datepicker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "angular-mighty-datepicker",
"version": "0.0.3",
"version": "0.0.4",
"authors": [
"Krzysztof Jung <[email protected]>",
"Patryk Peas <[email protected]>"
"Patryk Peas <[email protected]>",
"Kamil Nicieja <[email protected]>"
],
"repository": "git://github.com/monterail/angular-mighty-datepicker.git",
"description": "Angular based datepicker with mighty options",
Expand Down
4 changes: 2 additions & 2 deletions src/angular-mighty-datepicker.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ angular.module("mightyDatepicker").directive "mightyDatepicker", ($compile) ->

_withinLimits = (day, month) ->
withinLimits = true
withinLimits &&= day.isBefore(options.before) if options.before
withinLimits &&= day.isAfter(options.after) if options.after
withinLimits &&= day.isBefore($scope.options.before) if $scope.options.before
withinLimits &&= day.isAfter($scope.options.after) if $scope.options.after
withinLimits

_isSelected = (day) ->
Expand Down
2 changes: 1 addition & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
$scope.date = null;
$scope.multi = [];
$scope.options = {start: moment().add('month', -1), months: 1, after: moment()}
$scope.options = {months: 1, after: moment()}
$scope.optionsM = {start: moment().add('month', -1), months: 3, mode: "multiple", after: moment()}
});
</script>
Expand Down

0 comments on commit bece914

Please sign in to comment.