Skip to content

fix(Calendar): a two-month calendar opens with max's month in the right pane when today is in that month, unless min is too - #9365

Closed
HelloOjasMutreja wants to merge 3 commits into
meta:mainfrom
HelloOjasMutreja:fix/calendar-two-month-open-max
Closed

HelloOjasMutreja wants to merge 3 commits into
meta:mainfrom
HelloOjasMutreja:fix/calendar-two-month-open-max

Conversation

@HelloOjasMutreja

@HelloOjasMutreja HelloOjasMutreja commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Refs #9357. This restores the opening month when there is no value or focusDate; a field that already holds a range starting in max's month still opens on that month (a selected value decides the opening month), which this change does not alter.

User impact

A Calendar with numberOfMonths={2}, and so every DateRangeInput by default, opens with its second month entirely after max whenever max falls in the current month and min is not in that month too. The usual case is max set to today, as a report's date range often is. The right-hand month then has no day to pick, and the previous month, which holds the selectable days, is hidden behind the Previous button.

Problem and solution fit

getInitialFocusDate already avoids this layout, but only when today is after max (#5306: opening on [max, max + 1] "would spend half the calendar on a month that is entirely out of bounds"). When today is on or before max in the same month, it returns today, and the calendar opens on exactly that [max, max + 1] layout. The reason for #5306's shift holds in both cases, so the shift applies to both.

Expected behavior and authority

The existing contract: the calendar opens inside the min/max window, with max's month in the last pane and the shift never crossing min's month (the helper's own doc comment, #5306, and the existing "keeps max in the last pane in the two-month layout" test). Calendar.spec.md records the opening month inside the window as shipped and does not prescribe this layout, so I found no spec that conflicts.

Smallest restoration

One added condition in getInitialFocusDate: with more than one pane, when today is in max's month, take the same branch as today-after-max. A single pane still opens on today. An explicit focusDate and a selected value are still honored first and are not second-guessed against max, as the helper documents. The issue also asks for the value case; I left that out because it would reverse the documented "value wins" rule, and it is a separate decision.

Evidence

  • Reproduction before the change: <Calendar numberOfMonths={2} max={today} /> on 1 November 2026 opens on November and December 2026. December is entirely disabled and only the 1st of November is selectable.
  • Result after the change: it opens on October and November 2026, with 31 selectable days in October and the 1st in November.
  • Representative unchanged paths: a single-pane calendar with max in the current month still opens on today; a two-month calendar with max in a later month still opens on today's month; min in the same month still stops the shift.
  • Regression test or other mutation-sensitive proof: two new cases in getInitialFocusDate.test.ts fail without the change (the two-month shift, and the shift stopping at min), plus a rendered Calendar test. The single-pane and later-max cases pass both with and without the change.

Real Chromium render from a built Storybook, using a temporary story that is not part of this PR. "Before" passes focusDate as the first of the current month to reproduce the old opening month:

Calendar with numberOfMonths 2 and max set to today, before and after

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • npx vitest run packages/core/src/Calendar packages/core/src/DateRangeInput packages/core/src/DateInput (16 files, 633 tests)
  • npx tsc --noEmit -p packages/core, eslint and prettier on the changed files
  • node scripts/release/changeset-coverage.mjs pr --base upstream/main
  • Chromium render of the before and after states, above

…ht pane when today is in that month

getInitialFocusDate shifted the panes back only when today was after max. With today in max's own month it opened on [max, max + 1], and the second pane held no selectable day. Apply the same shift there, still stopping at min's month. A single pane keeps today.
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 3, 2026 9:18am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 11, 2026, 1:42 PM UTC

@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Nov 1, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 5a44216

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
charts/Chart 67.2 kB (not measured) · 20 B CSS (not measured) — — · — · —
charts/ChartAxis 6.7 kB (not measured) · 112 B CSS (not measured) — — · — · —
charts/ChartLegend 56.6 kB (not measured) · 20 B CSS (not measured) — — · — · —
233 more components
Component Size LoC Visual · A11y · RTL
charts/ChartTooltip 56.5 kB (not measured) · 20 B CSS (not measured) 352 (not measured) — · — · —
AlertDialog · Storybook 59.9 kB (not measured) · 12.7 kB CSS (not measured) 183 (not measured) — · — · —
AppShell · Storybook 71.7 kB (not measured) · 12.0 kB CSS (not measured) 1,011 (not measured) — · — · —
AspectRatio · Storybook 3.8 kB (not measured) · 3.6 kB CSS (not measured) 109 (not measured) — · — · —
Avatar 39.2 kB (not measured) · 6.5 kB CSS (not measured) — — · — · —
AvatarGroup 41.9 kB (not measured) · 6.6 kB CSS (not measured) — — · — · —
AvatarGroupOverflow 42.6 kB (not measured) · 6.5 kB CSS (not measured) — — · — · —
AvatarStatusDot 7.2 kB (not measured) · 3.6 kB CSS (not measured) — — · — · —
Badge · Storybook 4.0 kB (not measured) · 4.0 kB CSS (not measured) 227 (not measured) — · — · —
Banner · Storybook 50.8 kB (not measured) · 10.2 kB CSS (not measured) 488 (not measured) — · — · —
BaseTypeahead 58.7 kB (not measured) · 10.2 kB CSS (not measured) — — · — · —
Blockquote 3.6 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
BottomSheet 34.5 kB (not measured) · 7.4 kB CSS (not measured) — — · — · —
BottomSheetSwitcher 14.9 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
BreadcrumbItem 71.0 kB (not measured) · 11.4 kB CSS (not measured) — — · — · —
Breadcrumbs 23.1 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
Button · Storybook 46.1 kB (not measured) · 9.4 kB CSS (not measured) 584 (not measured) — · — · —
ButtonGroup · Storybook 9.0 kB (not measured) · 3.4 kB CSS (not measured) 128 (not measured) — · — · —
Calendar · Storybook 58.2 kB (not measured) · 10.3 kB CSS (not measured) 1,646 (not measured) — · — · —
Card · Storybook 6.5 kB (not measured) · 6.5 kB CSS (not measured) 189 (not measured) — · — · —
Carousel · Storybook 53.5 kB (not measured) · 10.5 kB CSS (not measured) 488 (not measured) — · — · —
Center 4.2 kB (not measured) · 4.7 kB CSS (not measured) — — · — · —
ChatComposer 64.3 kB (not measured) · 11.1 kB CSS (not measured) — — · — · —
ChatComposerDrawer 24.6 kB (not measured) · 4.7 kB CSS (not measured) — — · — · —
ChatComposerInput 58.9 kB (not measured) · 10.3 kB CSS (not measured) — — · — · —
ChatComposerTokenElement 58.9 kB (not measured) · 10.3 kB CSS (not measured) — — · — · —
ChatDictationButton 49.5 kB (not measured) · 9.8 kB CSS (not measured) — — · — · —
ChatLayout 52.0 kB (not measured) · 10.2 kB CSS (not measured) — — · — · —
ChatLayoutScrollButton 49.5 kB (not measured) · 9.9 kB CSS (not measured) — — · — · —
ChatMessage 23.7 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
ChatMessageBubble 7.1 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
ChatMessageList 29.9 kB (not measured) · 7.9 kB CSS (not measured) — — · — · —
ChatMessageMetadata 26.6 kB (not measured) · 4.1 kB CSS (not measured) — — · — · —
ChatSendButton 48.8 kB (not measured) · 9.4 kB CSS (not measured) — — · — · —
ChatSystemMessage 6.8 kB (not measured) · 3.8 kB CSS (not measured) — — · — · —
ChatTokenizedText 7.1 kB (not measured) · 4.0 kB CSS (not measured) — — · — · —
ChatToolCalls 33.0 kB (not measured) · 9.2 kB CSS (not measured) — — · — · —
CheckboxIndicator 2.7 kB (not measured) · 813 B CSS (not measured) — — · — · —
CheckboxInput · Storybook 53.1 kB (not measured) · 9.6 kB CSS (not measured) 356 (not measured) — · — · —
CheckboxList 48.2 kB (not measured) · 8.5 kB CSS (not measured) — — · — · —
CheckboxListItem 57.7 kB (not measured) · 11.0 kB CSS (not measured) — — · — · —
CheckIndicator 7.8 kB (not measured) · 681 B CSS (not measured) — — · — · —
Citation · Storybook 26.8 kB (not measured) · 4.4 kB CSS (not measured) 229 (not measured) — · — · —
ClickableCard · Storybook 14.0 kB (not measured) · 7.1 kB CSS (not measured) 262 (not measured) — · — · —
Code · Storybook 3.6 kB (not measured) · 3.5 kB CSS (not measured) 81 (not measured) — · — · —
CodeBlock · Storybook 63.4 kB (not measured) · 11.0 kB CSS (not measured) 2,179 (not measured) — · — · —
Collapsible 21.6 kB (not measured) · 4.5 kB CSS (not measured) — — · — · —
CollapsibleGroup 6.5 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
CommandPalette 54.1 kB (not measured) · 12.1 kB CSS (not measured) — — · — · —
CommandPaletteEmpty 6.2 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
CommandPaletteFooter 23.9 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
CommandPaletteGroup 3.5 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
CommandPaletteInput 33.7 kB (not measured) · 8.4 kB CSS (not measured) — — · — · —
CommandPaletteItem 9.5 kB (not measured) · 3.6 kB CSS (not measured) — — · — · —
CommandPaletteList 23.1 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
ComplexSelector · Storybook 59.6 kB (not measured) · 11.0 kB CSS (not measured) 680 (not measured) — · — · —
ContextMenu · Storybook 78.7 kB (not measured) · 15.3 kB CSS (not measured) 688 (not measured) — · — · —
ContextMenuItem 56.6 kB (not measured) · 9.9 kB CSS (not measured) — — · — · —
DateInput · Storybook 103.8 kB (not measured) · 15.1 kB CSS (not measured) 3,609 (not measured) — · — · —
DateRangeInput · Storybook 73.1 kB (not measured) · 11.5 kB CSS (not measured) 640 (not measured) — · — · —
DateTimeInput · Storybook 115.6 kB (not measured) · 15.6 kB CSS (not measured) 3,618 (not measured) — · — · —
Dialog 16.2 kB (not measured) · 6.6 kB CSS (not measured) — — · — · —
DialogHeader 51.9 kB (not measured) · 10.1 kB CSS (not measured) — — · — · —
Drawer 33.8 kB (not measured) · 8.2 kB CSS (not measured) — — · — · —
DrawerHeader 52.0 kB (not measured) · 11.5 kB CSS (not measured) — — · — · —
DropdownMenu 76.7 kB (not measured) · 15.4 kB CSS (not measured) — — · — · —
DropdownMenuCheckboxItem 17.7 kB (not measured) · 5.9 kB CSS (not measured) — — · — · —
DropdownMenuDivider 5.2 kB (not measured) · 548 B CSS (not measured) — — · — · —
DropdownMenuGroup 6.2 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
DropdownMenuItem 16.9 kB (not measured) · 5.5 kB CSS (not measured) — — · — · —
DropdownMenuRadioGroup 6.1 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
DropdownMenuRadioItem 17.7 kB (not measured) · 5.9 kB CSS (not measured) — — · — · —
DropdownMenuSubMenu 62.0 kB (not measured) · 9.9 kB CSS (not measured) — — · — · —
EmptyState 6.4 kB (not measured) · 485 B CSS (not measured) — — · — · —
Field 46.4 kB (not measured) · 8.3 kB CSS (not measured) — — · — · —
FieldLabel 40.1 kB (not measured) · 5.9 kB CSS (not measured) — — · — · —
FieldStatus · Storybook 9.4 kB (not measured) · 3.6 kB CSS (not measured) 163 (not measured) — · — · —
FileInput · Storybook 57.6 kB (not measured) · 10.7 kB CSS (not measured) 774 (not measured) — · — · —
FormLayout · Storybook 6.4 kB (not measured) · 3.5 kB CSS (not measured) 94 (not measured) — · — · —
Grid 4.4 kB (not measured) · 3.8 kB CSS (not measured) — — · — · —
GridSpan 3.5 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
Heading 7.9 kB (not measured) · 6.0 kB CSS (not measured) — — · — · —
HoverCard · Storybook 18.2 kB (not measured) · 5.0 kB CSS (not measured) 683 (not measured) — · — · —
HStack 5.9 kB (not measured) · 1.7 kB CSS (not measured) — — · — · —
Icon · Storybook 7.6 kB (not measured) · 681 B CSS (not measured) 700 (not measured) — · — · —
IconButton · Storybook 46.1 kB (not measured) · 9.4 kB CSS (not measured) 17 (not measured) — · — · —
InfoTip · Storybook — 68 (not measured) — · — · —
InputGroup 47.0 kB (not measured) · 8.3 kB CSS (not measured) — — · — · —
InputGroupText 6.4 kB (not measured) · 3.9 kB CSS (not measured) — — · — · —
Item · Storybook 12.7 kB (not measured) · 4.9 kB CSS (not measured) 1,599 (not measured) — · — · —
Kbd · Storybook 23.6 kB (not measured) · 3.6 kB CSS (not measured) 147 (not measured) — · — · —
LayerProvider 67.1 kB (not measured) · 10.4 kB CSS (not measured) — — · — · —
Layout 6.8 kB (not measured) · 2.3 kB CSS (not measured) — — · — · —
LayoutContent 6.0 kB (not measured) · 1.8 kB CSS (not measured) — — · — · —
LayoutFooter 5.9 kB (not measured) · 1.7 kB CSS (not measured) — — · — · —
LayoutHeader 6.0 kB (not measured) · 1.7 kB CSS (not measured) — — · — · —
LayoutPanel 7.6 kB (not measured) · 5.0 kB CSS (not measured) — — · — · —
Lightbox · Storybook 54.6 kB (not measured) · 10.1 kB CSS (not measured) 810 (not measured) — · — · —
Link 46.6 kB (not measured) · 7.9 kB CSS (not measured) — — · — · —
LinkProvider 3.5 kB (not measured) · 20 B CSS (not measured) — — · — · —
List 5.4 kB (not measured) · 435 B CSS (not measured) — — · — · —
ListItem 57.1 kB (not measured) · 11.0 kB CSS (not measured) — — · — · —
Markdown · Storybook 149.1 kB (not measured) · 18.2 kB CSS (not measured) 8,700 (not measured) — · — · —
MetadataList 23.8 kB (not measured) · 3.8 kB CSS (not measured) — — · — · —
MetadataListItem 6.6 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
MobileNav 54.3 kB (not measured) · 10.4 kB CSS (not measured) — — · — · —
MobileNavToggle 49.3 kB (not measured) · 9.7 kB CSS (not measured) — — · — · —
MoreMenu · Storybook 77.0 kB (not measured) · 15.4 kB CSS (not measured) 87 (not measured) — · — · —
MultiSelector · Storybook 76.6 kB (not measured) · 15.0 kB CSS (not measured) 2,709 (not measured) — · — · —
NavHeadingMenu 13.8 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
NavIcon 3.5 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
NumberInput · Storybook 59.1 kB (not measured) · 11.1 kB CSS (not measured) 1,144 (not measured) — · — · —
Outline · Storybook 30.8 kB (not measured) · 4.2 kB CSS (not measured) 1,228 (not measured) — · — · —
OverflowList · Storybook 8.6 kB (not measured) · 3.6 kB CSS (not measured) 230 (not measured) — · — · —
Overlay · Storybook 19.7 kB (not measured) · 4.0 kB CSS (not measured) 458 (not measured) — · — · —
Pagination · Storybook 89.3 kB (not measured) · 15.8 kB CSS (not measured) 646 (not measured) — · — · —
Popover · Storybook 52.7 kB (not measured) · 12.4 kB CSS (not measured) 987 (not measured) — · — · —
PowerSearch · Storybook 175.3 kB (not measured) · 20.3 kB CSS (not measured) 3,958 (not measured) — · — · —
ProgressBar · Storybook 7.9 kB (not measured) · 6.9 kB CSS (not measured) 411 (not measured) — · — · —
RadioIndicator 2.5 kB (not measured) · 725 B CSS (not measured) — — · — · —
RadioList 47.8 kB (not measured) · 8.3 kB CSS (not measured) — — · — · —
RadioListItem 55.6 kB (not measured) · 10.0 kB CSS (not measured) — — · — · —
ResizeHandle 25.7 kB (not measured) · 4.0 kB CSS (not measured) — — · — · —
ScrollableArea · Storybook 10.7 kB (not measured) · 4.4 kB CSS (not measured) 215 (not measured) — · — · —
Section · Storybook 7.6 kB (not measured) · 6.3 kB CSS (not measured) 230 (not measured) — · — · —
SegmentedControl 40.9 kB (not measured) · 6.5 kB CSS (not measured) — — · — · —
SegmentedControlItem 9.7 kB (not measured) · 4.0 kB CSS (not measured) — — · — · —
SelectableCard · Storybook 13.8 kB (not measured) · 7.3 kB CSS (not measured) 305 (not measured) — · — · —
Selector 80.7 kB (not measured) · 15.4 kB CSS (not measured) — — · — · —
SelectorOption 16.0 kB (not measured) · 5.4 kB CSS (not measured) — — · — · —
SideNav 69.5 kB (not measured) · 10.9 kB CSS (not measured) — — · — · —
SideNavCollapseButton 49.8 kB (not measured) · 9.8 kB CSS (not measured) — — · — · —
SideNavHeading 61.8 kB (not measured) · 10.5 kB CSS (not measured) — — · — · —
SideNavItem 58.1 kB (not measured) · 10.4 kB CSS (not measured) — — · — · —
SideNavSection 6.6 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
Skeleton · Storybook 3.8 kB (not measured) · 3.8 kB CSS (not measured) 130 (not measured) — · — · —
Slider · Storybook 51.1 kB (not measured) · 8.8 kB CSS (not measured) 1,051 (not measured) — · — · —
Spinner · Storybook 25.7 kB (not measured) · 6.7 kB CSS (not measured) 296 (not measured) — · — · —
Stack 5.7 kB (not measured) · 1.7 kB CSS (not measured) — — · — · —
StackItem 4.6 kB (not measured) · 219 B CSS (not measured) — — · — · —
StatusDot · Storybook 20.1 kB (not measured) · 6.3 kB CSS (not measured) 151 (not measured) — · — · —
Step 34.3 kB (not measured) · 5.6 kB CSS (not measured) — — · — · —
Stepper 50.5 kB (not measured) · 9.9 kB CSS (not measured) — — · — · —
Switch · Storybook 51.4 kB (not measured) · 9.7 kB CSS (not measured) 573 (not measured) — · — · —
Tab 10.7 kB (not measured) · 4.2 kB CSS (not measured) — — · — · —
Table 88.6 kB (not measured) · 16.0 kB CSS (not measured) — — · — · —
TableBody 3.4 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
TableCell 79.9 kB (not measured) · 15.7 kB CSS (not measured) — — · — · —
TableFooter 3.4 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
TableHeader 3.4 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
TableHeaderCell 79.6 kB (not measured) · 15.4 kB CSS (not measured) — — · — · —
TableRow 6.5 kB (not measured) · 4.0 kB CSS (not measured) — — · — · —
TableSelectionToolbar 55.5 kB (not measured) · 11.4 kB CSS (not measured) — — · — · —
TabList 42.1 kB (not measured) · 7.4 kB CSS (not measured) — — · — · —
TabMenu 58.6 kB (not measured) · 10.4 kB CSS (not measured) — — · — · —
Text · Storybook 7.4 kB (not measured) · 6.0 kB CSS (not measured) 540 (not measured) — · — · —
TextArea · Storybook 51.7 kB (not measured) · 9.7 kB CSS (not measured) 475 (not measured) — · — · —
TextInput · Storybook 56.8 kB (not measured) · 10.8 kB CSS (not measured) 391 (not measured) — · — · —
Thumbnail · Storybook 53.8 kB (not measured) · 11.3 kB CSS (not measured) 355 (not measured) — · — · —
TimeInput · Storybook 92.3 kB (not measured) · 14.1 kB CSS (not measured) 1,256 (not measured) — · — · —
Timer · Storybook 9.5 kB (not measured) · 6.9 kB CSS (not measured) 186 (not measured) — · — · —
Timestamp · Storybook 28.4 kB (not measured) · 9.9 kB CSS (not measured) 676 (not measured) — · — · —
Toast · Storybook 63.0 kB (not measured) · 10.0 kB CSS (not measured) 1,502 (not measured) — · — · —
ToggleButton 46.9 kB (not measured) · 9.5 kB CSS (not measured) — — · — · —
ToggleButtonGroup 6.4 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
Token · Storybook 31.6 kB (not measured) · 4.8 kB CSS (not measured) 538 (not measured) — · — · —
Tokenizer · Storybook 73.4 kB (not measured) · 16.9 kB CSS (not measured) 1,967 (not measured) — · — · —
Toolbar · Storybook 41.5 kB (not measured) · 7.9 kB CSS (not measured) 269 (not measured) — · — · —
Tooltip · Storybook 17.9 kB (not measured) · 5.0 kB CSS (not measured) 577 (not measured) — · — · —
TopNav 55.2 kB (not measured) · 10.7 kB CSS (not measured) — — · — · —
TopNavHeading 61.3 kB (not measured) · 10.3 kB CSS (not measured) — — · — · —
TopNavItem 10.1 kB (not measured) · 4.0 kB CSS (not measured) — — · — · —
TopNavMegaMenu 57.6 kB (not measured) · 11.1 kB CSS (not measured) — — · — · —
TopNavMegaMenuFeaturedCard 6.8 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
TopNavMegaMenuItem 10.2 kB (not measured) · 4.2 kB CSS (not measured) — — · — · —
TopNavMenu 61.3 kB (not measured) · 10.5 kB CSS (not measured) — — · — · —
TreeList · Storybook 43.2 kB (not measured) · 5.0 kB CSS (not measured) 1,082 (not measured) — · — · —
Typeahead 66.3 kB (not measured) · 11.7 kB CSS (not measured) — — · — · —
TypeaheadItem 6.3 kB (not measured) · 3.6 kB CSS (not measured) — — · — · —
VStack 5.9 kB (not measured) · 1.7 kB CSS (not measured) — — · — · —
lab/ChartArea 5.9 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ChartBar 3.7 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ChartCandlestick 4.4 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ChartDot 3.6 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ChartDotGL 7.4 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ChartDotGLInteractive 8.3 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ChartHeatmapGL 8.5 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ChartLine 5.5 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ChartStreamGL 7.5 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ChatEmojiPicker 68.7 kB (not measured) · 773 B CSS (not measured) — — · — · —
lab/ChatReactionBar 69.2 kB (not measured) · 1.1 kB CSS (not measured) — — · — · —
lab/ChatReasoning 7.0 kB (not measured) · 967 B CSS (not measured) — — · — · —
lab/ChatTypingIndicator 24.3 kB (not measured) · 612 B CSS (not measured) — — · — · —
lab/ChatUnreadDivider 3.6 kB (not measured) · 348 B CSS (not measured) — — · — · —
lab/CircleCheckIndicator — — — · — · —
lab/CircularProgress · Storybook 8.5 kB (not measured) · 1.1 kB CSS (not measured) 597 (not measured) — · — · —
lab/CodeEditor · Storybook 13.9 kB (not measured) · 665 B CSS (not measured) 461 (not measured) — · — · —
lab/CommentComposer 98.0 kB (not measured) · 1.9 kB CSS (not measured) — — · — · —
lab/CommentPin 50.7 kB (not measured) · 1.2 kB CSS (not measured) — — · — · —
lab/Comments 226.6 kB (not measured) · 2.5 kB CSS (not measured) — — · — · —
lab/CommentThread 221.9 kB (not measured) · 2.4 kB CSS (not measured) — — · — · —
lab/DialogHeroHeader — — — · — · —
lab/DiffViewer · Storybook 47.2 kB (not measured) · 2.1 kB CSS (not measured) 2,203 (not measured) — · — · —
lab/EmojiPicker · Storybook 66.5 kB (not measured) · 722 B CSS (not measured) 3,581 (not measured) — · — · —
lab/InfoTip · Storybook 23.1 kB (not measured) · 458 B CSS (not measured) 68 (not measured) — · — · —
lab/LineClamp — — — · — · —
lab/ListInput · Storybook 78.5 kB (not measured) · 1.6 kB CSS (not measured) 1,760 (not measured) — · — · —
lab/LogStream · Storybook 8.0 kB (not measured) · 1.6 kB CSS (not measured) 468 (not measured) — · — · —
lab/MobilePowerSearch · Storybook 160.8 kB (not measured) · 1.2 kB CSS (not measured) 3,161 (not measured) — · — · —
lab/MobileTokenizer · Storybook 96.4 kB (not measured) · 880 B CSS (not measured) 1,086 (not measured) — · — · —
lab/NavigationScreen — — — · — · —
lab/NavigationStack — — — · — · —
lab/PageControl — — — · — · —
lab/RadialChart 4.7 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/SankeyChart 5.3 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/Schedule · Storybook 64.1 kB (not measured) · 3.9 kB CSS (not measured) 4,750 (not measured) — · — · —
lab/SelectableCardGroup — — — · — · —
lab/Stat 4.2 kB (not measured) · 646 B CSS (not measured) — — · — · —
lab/SVGIcon 7.6 kB (not measured) · 764 B CSS (not measured) — — · — · —
lab/TabBar — — — · — · —
lab/TabBarItem — — — · — · —
lab/ThreeDBar 3.9 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ThreeDChart 4.8 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ThreeDScatter 3.7 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ThreeDScatterGL 7.6 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/ThreeDSurface 4.1 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/TourStep 58.1 kB (not measured) · 590 B CSS (not measured) — — · — · —
lab/TransferList 70.6 kB (not measured) · 1.7 kB CSS (not measured) — — · — · —
lab/TransferListSelector 76.2 kB (not measured) · 1.9 kB CSS (not measured) — — · — · —
richtext/RichTextEditor · Storybook 273.2 kB (not measured) · 2.6 kB CSS (not measured) 668 (not measured) — · — · —
richtext/RichTextEditorAutoLinkPlugin 102.9 kB (not measured) · 20 B CSS (not measured) 37 (not measured) — · — · —
richtext/RichTextEditorToolbar 217.3 kB (not measured) · 454 B CSS (not measured) 870 (not measured) — · — · —
richtext/RichTextView 253.7 kB (not measured) · 2.3 kB CSS (not measured) — — · — · —

Package size: measured; main has no measurement of the merge base to compare yet.

Wide change (124 components): add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.

⚠️ Approximate analysis - the diff could not be resolved to a merge base, so a two-dot fallback was used. The component list may include base-only changes or miss a component whose change also landed on base.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested on one point: the code change is sound and well tested, but the release note says more than the fix does. The changeset says every DateRangeInput with max in the current month now opens on the previous month, yet a field that already holds a range starting in max's month still opens on that month beside an all-disabled next month, because a selected value still decides the opening month. Please reword the changeset to say the change applies with no value or focusDate, when today is on or before max in max's month, and reference #9357 without a closing keyword (or split out the selected-value case) so the issue is not closed with that case still open.

[Automated review]

'@astryxdesign/core': patch
---

[fix] `Calendar` with `numberOfMonths={2}` (and so `DateRangeInput`): when `max` falls in the current month, the calendar now opens on the month before it, so `max`'s month sits in the right-hand pane. It used to open on `[this month, next month]` with every day of the second month disabled. A single-month calendar still opens on today.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This claims more than the change does: with a selected value (for example a DateRangeInput showing Nov 1 – Nov 1 with max = today) the calendar still opens on max's month beside an all-disabled next month, and min in max's month still stops the shift. Suggested wording:

[fix] `Calendar` with `numberOfMonths={2}` (and so an empty `DateRangeInput`): with no `value` or `focusDate`, when today is on or before `max` in `max`'s month, the calendar now opens on the month before, so `max`'s month sits in the right-hand pane, never before `min`'s month. A selected value still decides the opening month, and a single-month calendar still opens on today.

@HelloOjasMutreja

Copy link
Copy Markdown
Contributor Author

CI here stops at the ci:run gate (lint, test, build and docsite-test report the label message), so none of those checks has run on this head. Could a maintainer add the ci:run label so they do? Locally the Calendar, DateRangeInput and DateInput suites (633 tests), the typecheck, eslint and prettier pass.

…alue case

The note said every DateRangeInput with max in the current month opens on the
previous month. A field that already holds a range starting in max's month
still opens on that month, because a selected value decides the opening month.
The note now says so, and refers to meta#9357 without closing it.
@HelloOjasMutreja

Copy link
Copy Markdown
Contributor Author

Reworded as asked. The changeset now says the change applies with no value or focusDate, when today is on or before max in max's month, and states that a field already holding a range that starts in max's month still opens on that month because a selected value decides the opening month. Both the changeset and the PR description now reference #9357 without a closing keyword, so the selected-value case is not closed by this PR.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an engineering owner's decision before it can be approved, plus one wording fix.

The Calendar spec leaves the opening month inside the min/max window uncontracted and allows either month first in the two-month layout, so no current rule decides whether a two-month calendar with today in max's month should open on the previous month and max's month. An engineering owner needs to approve that behavior on this pull request (for example by commenting /approve-spec followed by the full head commit SHA) or record the rule in the Calendar spec; the author may do so if they are an engineering owner.

Blocking:

  • The changeset and the title say the calendar now opens on the month before whenever today is on or before max in max's month, but when min is in that month too the shift stops at min and the calendar still opens on max's month beside an all-disabled next month (the new test does not shift a two-month layout back past min when today is in the month of max pins this), so please add that exception, for example "…so max's month sits in the right-hand pane, unless min is in that month too."

The code change itself is small, and its new tests fail without it and pass with it.

[Automated review]

'@astryxdesign/core': patch
---

[fix] `Calendar` with `numberOfMonths={2}` (and so `DateRangeInput`) and no `value` or `focusDate`: when today is on or before `max` in `max`'s month, the calendar now opens on the month before it, so `max`'s month sits in the right-hand pane. It used to open on `[this month, next month]` with every day of the second month disabled. A field that already holds a range starting in `max`'s month still opens on that month, because a selected value decides the opening month. A single-month calendar still opens on today. (#9357)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still claims more than the change does: when min is also in max's month, the shift stops at min and the calendar opens on max's month beside an all-disabled next month (the new test does not shift a two-month layout back past min when today is in the month of max pins this). Suggested addition:

…so `max`'s month sits in the right-hand pane, unless `min` is in that month too.

Comment on lines +78 to +80
// With several panes, today in `max`'s own month needs the same shift: the
// calendar would otherwise open on `[max, max + 1]`, and the second pane
// would hold no selectable day. A single pane keeps today itself.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the first sentence is long and covers two topics, the last one restates numberOfMonths > 1, and the reason repeats the JSDoc above. A shorter comment that keeps only the reason:

// Two panes on [max, max + 1] leave the second pane with no enabled day.

@HelloOjasMutreja HelloOjasMutreja changed the title fix(Calendar): a two-month calendar opens with max's month in the right pane when today is in that month fix(Calendar): a two-month calendar opens with max's month in the right pane when today is in that month, unless min is too Nov 3, 2026
@HelloOjasMutreja

Copy link
Copy Markdown
Contributor Author

Added the exception in 5a44216: the changeset now says max's month sits in the right-hand pane "unless min is in that month too (the shift stops at min, and the calendar still opens on max's month)". The title and the description's User impact carry the same exception. No code change.

The decision on the opening month inside the min/max window is still with an engineering owner.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an engineering owner's decision before it can be approved; the code change itself is ready.

The Calendar spec leaves the opening month inside the min/max window uncontracted and allows either month first in the two-month layout, so no current rule decides whether a two-month calendar with today in max's month should open on the previous month and max's month. An engineering owner needs to approve that behavior on this pull request (by commenting /approve-spec followed by the full head commit SHA) or record the opening-month rule in the Calendar spec; the author may do so if they are an engineering owner.

The changeset now matches what the change does, including the min exception, and the new tests fail without the fix and pass with it.

[Automated review]

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 10, 2026
@cixzhang
cixzhang marked this pull request as draft November 10, 2026 00:20
@cixzhang
cixzhang marked this pull request as ready for review November 10, 2026 00:21
@cixzhang cixzhang removed the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 10, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

(Posted by Cindy's agent.) Thank you for working on this! A newer PR for the same two-month Calendar case, #11202, follows the rule the Calendar spec records (max's month stays in the last pane), so we're going ahead with that one and closing this as a duplicate. Your report and fix helped pin down the case.

@cixzhang cixzhang closed this Nov 11, 2026

This branch was successfully deployed

1 active deployment
Preview — 5a442161 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants