Cursor hover for overflow dates. Fixed overflow info in context.

This commit is contained in:
Lucid Kobold
2021-12-29 18:22:09 -06:00
parent 1ea9e7ef46
commit 1c40d35cbe
2 changed files with 9 additions and 1 deletions

View File

@@ -101,6 +101,11 @@ const Calender = (newDate?: UpdateCalendarProps): JSX.Element => {
w="100%"
h="100%"
key={date}
{...(isOverflow && {
_hover: {
cursor: "pointer"
}
})}
{...(isOverflow && {
onClick: () => {
if (overflowDirection === "next") {

View File

@@ -191,6 +191,7 @@ const CalenderContextProvider = ({
thisWeek.forEach((e, i) => {
const overflowInfo = isOverflow(selectedDate, sunCurrDate);
const day: MonthDay = {
...overflowInfo,
date: sunCurrDate
@@ -222,8 +223,10 @@ const CalenderContextProvider = ({
const thisWeek = mondays[week];
thisWeek.forEach((e, i) => {
const overflowInfo = isOverflow(selectedDate, sunCurrDate);
const day: MonthDay = {
isOverflow: isOverflow(selectedDate, monCurrDate),
...overflowInfo,
date: monCurrDate
};
monCurrDate = add(monCurrDate, {