fix DatePicker bug
This commit is contained in:
parent
b5fcf67b53
commit
537403ba0c
1 changed files with 3 additions and 1 deletions
|
@ -75,7 +75,9 @@
|
|||
|
||||
return this.calendar(tableYear, tableMonth, (cell) => {
|
||||
// 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
|
||||
// https://www.cnblogs.com/hamsterPP/p/5415472.html
|
||||
if (cell.date instanceof Date) cell.date.setTime(cell.date.getTime() + cell.date.getTimezoneOffset() * 60000 + 480 * 60 * 1000);
|
||||
|
||||
const time = cell.date && clearHours(cell.date);
|
||||
const dateIsInCurrentMonth = cell.date && tableMonth === cell.date.getMonth();
|
||||
|
|
Loading…
Add table
Reference in a new issue