[WC-3492]: fix(calendar-web): apply custom Header day format to column headers#2312
Open
rahmanunver wants to merge 2 commits into
Open
[WC-3492]: fix(calendar-web): apply custom Header day format to column headers#2312rahmanunver wants to merge 2 commits into
rahmanunver wants to merge 2 commits into
Conversation
In Custom view the Header day format was only wired into react-big-calendar's toolbar-title keys (dayHeaderFormat/monthHeaderFormat), so the day/week/month column headers still used RBC's default dayFormat (dd eee, rendering "07 Tue") and the user's pattern was silently dropped. Wire customViewHeaderDayFormat into RBC's per-column keys: dayFormat (day/week columns) and weekdayFormat (month weekday headers). RBC shares a single global dayFormat across day and week, so when both items set different patterns the week pattern wins (matching the existing timeGutterFormat precedence) and a warning is logged. Add unit tests covering both formats, the collision precedence, and the no-format regression.
This comment has been minimized.
This comment has been minimized.
gjulivan
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
What: In the Calendar widget's Custom view, the "Header day format" property now applies to the day, week, and month column headers — not just the toolbar title.
Why: A customer (Mendix 10.24.19, Calendar module 2.4.0) set
Header day format: EE dd-MMbut the day-column header still rendered the default07 Tue.react-big-calendar uses two distinct sets of format keys:
dayHeaderFormat/monthHeaderFormat— the toolbar navigation titledayFormat(week/day columns) andweekdayFormat(month weekday headers) — the per-column headers, the "07 Tue" text the user actually seesCalendarPropsBuilder.buildFormatswiredcustomViewHeaderDayFormatonly into the toolbar-title keys, so the column headers kept RBC's date-fns defaultdayFormat: 'dd eee'and the user's pattern was silently dropped.Fix:
buildFormatsnow also setsformats.dayFormat(day/week columns) andformats.weekdayFormat(month) from the samecustomViewHeaderDayFormatpattern. RBC exposes a single shareddayFormatfor day and week, so when both items set different patterns the week pattern wins (consistent with the existingtimeGutterFormatprecedence) and aconsole.warnis logged on collision. The custom work_week view spreadsformatsinto RBC'sTimeGrid, so it inherits the newdayFormatautomatically.Added unit tests for both formats, the collision precedence + warning, the no-format regression, and the existing time-gutter wiring (21/21 pass).
What should be covered while testing?
dayandweektoolbar items.Header day format = EE dd-MMandTime gutter format = HH:mm.Tue 07-07(not07 Tue); time gutter shows 24h14:00.