This commit is contained in:
mo.duan 2019-10-29 11:40:29 +08:00
parent d241b8fe7d
commit 5bc98a52cf

View file

@ -76,7 +76,7 @@
return this.calendar(tableYear, tableMonth, (cell) => {
// normalize date offset from the dates provided by jsCalendar
// 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);
if (cell.date instanceof Date) cell.date.setTime(clearHours(cell.date));
const time = cell.date && clearHours(cell.date);
const dateIsInCurrentMonth = cell.date && tableMonth === cell.date.getMonth();