Skip to content

Commit

Permalink
fix(react-calendar-compat): Classnames removed and added to day cells…
Browse files Browse the repository at this point in the history
… need to be split instead of providing a string with spaces (#29611)

* fix: Classnames removed and added to day cells need to be split instead of providing a string with spaces.

* change file
  • Loading branch information
sopranopillow authored Oct 20, 2023
1 parent c8ed0b5 commit 2b55f6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: Classnames removed and added to day cells need to be split instead of providing a string with spaces.",
"packageName": "@fluentui/react-calendar-compat",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const CalendarGridDayCell: React.FunctionComponent<CalendarGridDayCellPro

const classNamesToAdd = calculateRoundedStyles(false, false, index > 0, index < dayRefs.length - 1).trim();
if (classNamesToAdd) {
dayRef.classList.add(...classNamesToAdd);
dayRef.classList.add(...classNamesToAdd.trim().split(' '));
}
}
}
Expand Down Expand Up @@ -182,7 +182,7 @@ export const CalendarGridDayCell: React.FunctionComponent<CalendarGridDayCellPro
) {
const classNamesToAdd = calculateRoundedStyles(false, false, index > 0, index < dayRefs.length - 1).trim();
if (classNamesToAdd) {
dayRef.classList.remove(...classNamesToAdd);
dayRef.classList.remove(...classNamesToAdd.trim().split(' '));
}
}
}
Expand Down

0 comments on commit 2b55f6c

Please sign in to comment.