Skip to content

Commit

Permalink
Version 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Lins committed Jun 9, 2015
1 parent 7adac0a commit 6cf3699
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"license": "MIT",
"ignore": [],
"description": "A complete datepicker written from scratch built on top of AngularJS",
"version": "0.2.1",
"version": "0.2.2",
"main": [
"./paDatepicker.min.js",
"./paDatepicker.tpls.js"
Expand Down
6 changes: 2 additions & 4 deletions paDatepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,8 @@
var currentDay = 1 - this.start.getDay() + this.container.getStartingDay();
var current = new Date(this.config.year, this.config.month, currentDay);

var start = new Date(current.getTime() - current.getTimezoneOffset() * 60000);
var end = new Date(this.end.getTime() - this.end.getTimezoneOffset() * 60000);

var rows = Math.ceil(((end - start) / 86400000) / 7);
var rows = (this.end - current) / (1000 * 60 * 60 * 24 * 7);
rows = (rows % 1 === 0) ? rows + 1 : Math.ceil(rows);

this.fillRows(rows, current);
},
Expand Down
Loading

0 comments on commit 6cf3699

Please sign in to comment.