This commit is contained in:
xinxin.li 2019-10-08 19:13:10 +08:00
parent a6068736cb
commit 03d8b80d45

View file

@ -75,7 +75,8 @@
return this.calendar(tableYear, tableMonth, (cell) => { return this.calendar(tableYear, tableMonth, (cell) => {
// normalize date offset from the dates provided by jsCalendar // normalize date offset from the dates provided by jsCalendar
if (cell.date instanceof Date) cell.date.setTime(cell.date.getTime() + cell.date.getTimezoneOffset() * 60000); // Comment out this code to fix daylight saving time bug
// if (cell.date instanceof Date) cell.date.setTime(cell.date.getTime() + cell.date.getTimezoneOffset() * 60000);
const time = cell.date && clearHours(cell.date); const time = cell.date && clearHours(cell.date);
const dateIsInCurrentMonth = cell.date && tableMonth === cell.date.getMonth(); const dateIsInCurrentMonth = cell.date && tableMonth === cell.date.getMonth();