Merge pull request #4250 from SergioCrisostomo/datepicker-patches
Normalize dates offset
This commit is contained in:
commit
28a0f8b0b7
1 changed files with 3 additions and 0 deletions
|
@ -74,6 +74,9 @@
|
|||
const disabledTestFn = typeof this.disabledDate === 'function' && this.disabledDate;
|
||||
|
||||
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);
|
||||
|
||||
const time = cell.date && clearHours(cell.date);
|
||||
const dateIsInCurrentMonth = cell.date && tableMonth === cell.date.getMonth();
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue