Skip to content

Commit d0d73dd

Browse files
authored
Merge pull request #458 from rozhkovs/patch-1
fix: Pixel 8a and 9 series sometimes do not render the calender #442
2 parents 46310cf + 0e85569 commit d0d73dd

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/Date/AutoSizer.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ export default function AutoSizer({
2626
[layout, setLayout]
2727
)
2828

29+
const isLayoutInitialized = layout && layout.height > 0 && layout.width > 0
30+
2931
return (
3032
<View
3133
onLayout={onLayout}
32-
style={[sharedStyles.overflowHidden, sharedStyles.root, layout && layout]}
34+
style={[
35+
sharedStyles.overflowHidden,
36+
sharedStyles.root,
37+
isLayoutInitialized && layout,
38+
]}
3339
>
34-
{layout ? children(layout) : null}
40+
{isLayoutInitialized ? children(layout) : null}
3541
</View>
3642
)
3743
}

src/Date/DatePickerModalContentHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export function HeaderContentRange({
216216
const formatter = useMemo(() => {
217217
return new Intl.DateTimeFormat(locale, {
218218
month: 'short',
219-
day: 'numeric'
219+
day: 'numeric',
220220
})
221221
}, [locale])
222222

0 commit comments

Comments
 (0)