Commit 02e1cb84 authored by qingwei.li's avatar qingwei.li

Fix the next year is calulated incorrectly, fixed #2152

parent 4da8b2a2
...@@ -367,8 +367,8 @@ ...@@ -367,8 +367,8 @@
target = target.parentNode.cells[1]; target = target.parentNode.cells[1];
} }
let year = this.year; let year = Number(this.year);
let month = this.month; let month = Number(this.month);
const cellIndex = target.cellIndex; const cellIndex = target.cellIndex;
const rowIndex = target.parentNode.rowIndex; const rowIndex = target.parentNode.rowIndex;
...@@ -377,7 +377,7 @@ ...@@ -377,7 +377,7 @@
const text = cell.text; const text = cell.text;
const className = target.className; const className = target.className;
const newDate = new Date(this.year, this.month, 1); const newDate = new Date(year, month, 1);
if (className.indexOf('prev') !== -1) { if (className.indexOf('prev') !== -1) {
if (month === 0) { if (month === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment