hide range and selections outside currentMonth
This commit is contained in:
parent
65ce6cedcb
commit
a781ad1a11
1 changed files with 5 additions and 4 deletions
|
@ -73,14 +73,15 @@
|
|||
|
||||
return this.calendar(tableYear, tableMonth, (cell) => {
|
||||
const time = cell.date && clearHours(cell.date);
|
||||
const dateIsInCurrentMonth = cell.date && tableMonth === cell.date.getMonth();
|
||||
return {
|
||||
...cell,
|
||||
type: time === today ? 'today' : cell.type,
|
||||
selected: selectedDays.includes(time),
|
||||
selected: dateIsInCurrentMonth && selectedDays.includes(time),
|
||||
disabled: (cell.date && disabledTestFn) && disabledTestFn(new Date(time)),
|
||||
range: isRange && isInRange(time, rangeStart, rangeEnd),
|
||||
start: isRange && time === minDay,
|
||||
end: isRange && time === maxDay
|
||||
range: dateIsInCurrentMonth && isRange && isInRange(time, rangeStart, rangeEnd),
|
||||
start: dateIsInCurrentMonth && isRange && time === minDay,
|
||||
end: dateIsInCurrentMonth && isRange && time === maxDay
|
||||
};
|
||||
}).cells.slice(this.showWeekNumbers ? 8 : 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue