Skip to content

Commit

Permalink
fixed bug of not changing year
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Kim committed Oct 10, 2015
1 parent bf9ca00 commit 47d859f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion angularjs-datetime-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@
};

var getMonthView = function(year, month) {
if (month>11) {
year++;
} else if (month < 0) {
year--;
}
month = (month + 12) % 12;
var firstDayOfMonth = new Date(year, month, 1),
lastDayOfMonth = new Date(year, month + 1, 0),
Expand Down Expand Up @@ -250,7 +255,7 @@
);
scope.selectedDay = scope.selectedDate.getDate();
if (attrs.ngModel) {
console.log('attrs.ngModel',attrs.ngModel);
//console.log('attrs.ngModel',attrs.ngModel);
var elScope = ctrl.triggerEl.scope(), dateValue;
if (elScope.$eval(attrs.ngModel) && elScope.$eval(attrs.ngModel).constructor.name === 'Date') {
dateValue = new Date(dateFilter(scope.selectedDate, dateFormat));
Expand Down
2 changes: 1 addition & 1 deletion angularjs-datetime-picker.min.js

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

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angularjs-datetime-picker",
"main": "angularjs-datetime-picker.js",
"version": "0.1.15",
"version": "0.1.16",
"homepage": "https://github.com/kineticsocial/angularjs-datetime-picker",
"authors": [
"Allen Kim <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angularjs-datetime-picker",
"version": "0.1.15",
"version": "0.1.16",
"description": "Very Lightweight AngularJS DateTime Picker Without Using jQuery, bootStrap, or moment",
"main": "angularjs-datetime-picker.js",
"scripts": {
Expand Down

0 comments on commit 47d859f

Please sign in to comment.