Merge pull request #6327 from demi798/2.0

fix bug #6326
This commit is contained in:
debugIsFalse 2019-10-29 11:10:46 +08:00 committed by GitHub
commit d241b8fe7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -201,7 +201,7 @@
child.width = this.listWidth;
child.height = typeof this.height === 'number' ? `${this.height}px` : this.height;
});
const slidesLength = this.slides.length || 0
const slidesLength = this.slides.length || 0;
this.trackWidth = slidesLength * this.listWidth;
},
// use when slot changed

View file

@ -75,7 +75,8 @@
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
// if (cell.date instanceof Date) cell.date.setTime(cell.date.getTime() + cell.date.getTimezoneOffset() * 60000);
const time = cell.date && clearHours(cell.date);
const dateIsInCurrentMonth = cell.date && tableMonth === cell.date.getMonth();