Skip to content

feat: expose isAnimated flag to renderDay for floating day header (#2721)#2748

Merged
kesha-antonov merged 1 commit into
masterfrom
fix/renderday-animated-flag
Jun 18, 2026
Merged

feat: expose isAnimated flag to renderDay for floating day header (#2721)#2748
kesha-antonov merged 1 commit into
masterfrom
fix/renderday-animated-flag

Conversation

@kesha-antonov

Copy link
Copy Markdown
Collaborator

Closes #2721

Problem

renderDay is used for both the inline day separators and the floating/animated day header that sticks to the top while scrolling. There was no way to distinguish the two inside a custom renderDay, so users were forced to give both the same look.

Fix

Pass an isAnimated flag in the DayProps handed to renderDay:

  • true for the floating animated header
  • false (or undefined) for the inline separators

A single renderDay can now branch on it:

renderDay={(props) =>
  props.isAnimated
    ? <FloatingDayHeader {...props} />
    : <Day {...props} />
}

dateFormat / dateFormatCalendar already flow through to the floating header, so custom date formats stay in sync there too (the second half of the issue).

This is non-breaking - isAnimated is an additive optional field on DayProps; existing renderDay callbacks keep working unchanged.

Validation

Verified on the Android emulator with a branching renderDay: the inline separators render one style while the floating header renders a distinct one as it appears during scroll.

renderDay is used for both the inline day separators and the floating
animated day header. Previously there was no way to tell the two apart,
so a custom renderDay was forced to use the same look for both.

Pass isAnimated in the DayProps given to renderDay (true for the floating
header, false for the inline separators) so a single renderDay can branch
and style each differently. dateFormat/dateFormatCalendar already flow to
the floating header, so custom date formats stay in sync there too.
@kesha-antonov kesha-antonov merged commit 7c2768d into master Jun 18, 2026
2 checks passed
@kesha-antonov kesha-antonov deleted the fix/renderday-animated-flag branch June 18, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to achieve different view for DayAnimated and different view for day component

1 participant