Skip to content

[scheduler] Open the time grid at 7 AM by default and add initialScrollTime - #23594

Open
rita-codes wants to merge 8 commits into
mui:masterfrom
rita-codes:18439-schedulerstyled-allow-to-scroll-to-a-given-time-on-mount-in-the-view-using-the-time-grid-primitive
Open

rita-codes wants to merge 8 commits into
mui:masterfrom
rita-codes:18439-schedulerstyled-allow-to-scroll-to-a-given-time-on-mount-in-the-view-using-the-time-grid-primitive

Conversation

@rita-codes

@rita-codes rita-codes commented Sep 14, 2026

Copy link
Copy Markdown
Member

Closes #18439.

The day and week time grids now open at 7 AM instead of midnight. viewConfig.day / viewConfig.week get an initialScrollTime to pick another hour:

<EventCalendar viewConfig={{ week: { startTime: 6, endTime: 22, initialScrollTime: 9 } }} />
  • A displayed hour (startTime to endTime - 1). Default 7, or startTime when 7 AM is not displayed. Invalid values warn in development and use the default.
  • Applied once, the first time the grid can scroll, with the row height measured from the layout. Navigating keeps the scroll position; switching views re-applies it.
  • Named after defaultVisibleDate rather than Bryntum's visibleStartTime: visible* is the controlled value here.
  • Out of scope: scrolling through apiRef, re-applying on navigation, opting out.

Argos screenshots of time grids will shift. With SSR the scroll applies on hydration.

Add `visibleStartTime` to the `day` and `week` entries of `viewConfig`.
The time grid scrolls to that hour when it mounts (default 7 AM), resolved
against the displayed `startTime`/`endTime` range.

Closes mui#18439

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmGrhcVP3zhJRvJ7d1pRoF
@rita-codes rita-codes added scope: scheduler Changes related to the scheduler. type: new feature Expand the scope of the product to solve a new problem. labels Sep 14, 2026
@rita-codes rita-codes self-assigned this Sep 14, 2026
…-given-time-on-mount-in-the-view-using-the-time-grid-primitive
@code-infra-dashboard

code-infra-dashboard Bot commented Sep 14, 2026

Copy link
Copy Markdown

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-scheduler 🔺+539B(+0.14%) 🔺+157B(+0.15%)
@mui/x-scheduler-premium 🔺+525B(+0.09%) 🔺+158B(+0.10%)
@mui/x-chat 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

- Rename `visibleStartTime` to `initialScrollTime`
- Whole hours only, invalid values fall back to the default
- Apply the scroll the first time the grid has a height, measured from the layout
- Cover view switch, config change, hidden mount and row height in tests
- Document the prop on every view type and add the day view demo

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmGrhcVP3zhJRvJ7d1pRoF
@rita-codes rita-codes changed the title [scheduler] Scroll the time grid to a given time on mount [scheduler] Open the time grid at 7 AM by default and add initialScrollTime Sep 15, 2026
rita-codes and others added 2 commits September 15, 2026 17:49
…-given-time-on-mount-in-the-view-using-the-time-grid-primitive
- Apply the scroll the first time the grid can scroll, not just when it has a height
- Align the default rule wording in the warning, the JSDoc and the docs
- Pin the tests against a dropped prop, a container resize and the compact views
- Show morning events in the day view demo

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmGrhcVP3zhJRvJ7d1pRoF
@rita-codes
rita-codes marked this pull request as ready for review September 15, 2026 16:07
rita-codes and others added 3 commits September 15, 2026 18:07
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmGrhcVP3zhJRvJ7d1pRoF
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmGrhcVP3zhJRvJ7d1pRoF
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmGrhcVP3zhJRvJ7d1pRoF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: scheduler Changes related to the scheduler. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scheduler][styled] Allow to scroll to a given time on mount in the view using the Time Grid primitive

1 participant