Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kube/dist/addons/datepicker/kube.datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
},
_getDaysInMonth: function (year, month)
{
return (((0 === (year%4)) && ((0 !== (year%100)) || (0 === (year%400)))) && (month === 1)) ? 29 : this.daysInMonth[month];
return (((0 === (year%4)) && ((0 !== (year%100)) || (0 === (year%400)))) && (month === 2)) ? 29 : this.daysInMonth[month];
}
});
})(Kube);
})(Kube);
2 changes: 1 addition & 1 deletion kube/dist/addons/datepicker/kube.datepicker.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions kube/dist/addons/kube-addons.js
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@
},
_getDaysInMonth: function (year, month)
{
return (((0 === (year%4)) && ((0 !== (year%100)) || (0 === (year%400)))) && (month === 1)) ? 29 : this.daysInMonth[month];
return (((0 === (year%4)) && ((0 !== (year%100)) || (0 === (year%400)))) && (month === 2)) ? 29 : this.daysInMonth[month];
}
});
})(Kube);
Expand Down Expand Up @@ -2457,4 +2457,4 @@
}
}
});
})(Kube);
})(Kube);
4 changes: 2 additions & 2 deletions kube/dist/addons/kube-addons.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions kube/src/js/addons/datepicker/datepicker.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@
},
_getDaysInMonth: function (year, month)
{
return (((0 === (year%4)) && ((0 !== (year%100)) || (0 === (year%400)))) && (month === 1)) ? 29 : this.daysInMonth[month];
// month isn't javascript's getMonth, where january is 0. january is 1, february is 2, and so on. so the leap year calculation has to be done, when month == 2
return (((0 === (year%4)) && ((0 !== (year%100)) || (0 === (year%400)))) && (month === 2)) ? 29 : this.daysInMonth[month];
}
});
})(Kube);
})(Kube);