Skip to content

Commit

Permalink
[@mantine/dates] Fix hideOutsideDates now working if `@mantine/date…
Browse files Browse the repository at this point in the history
…s` is used as a headless library (#5003)
  • Loading branch information
rtivital committed Dec 4, 2023
1 parent 5daccb8 commit 355d685
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ export function Usage() {
);
}

export function HideOutsideDates() {
return (
<div style={{ padding: 40 }}>
<DatePicker hideOutsideDates />
</div>
);
}

export function Unstyled() {
return (
<div style={{ padding: 40 }}>
Expand Down
2 changes: 1 addition & 1 deletion packages/@mantine/dates/src/components/Day/Day.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const Day = factory<DayFactory>((_props, ref) => {

return (
<UnstyledButton<any>
{...getStyles('day')}
{...getStyles('day', { style: hidden ? { display: 'none' } : undefined })}
component={isStatic ? 'div' : 'button'}
ref={ref}
disabled={disabled}
Expand Down

0 comments on commit 355d685

Please sign in to comment.