Sitelet https://github.com/flutter/packages/pull/12697
Skip to content

[material_ui] Fix todayBorder color being overridden by todayForegroundColor in YearPicker - #12697

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
Massinissa-Mouhoub:port-189345
Sep 14, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:mainfrom
Massinissa-Mouhoub:port-189345

Conversation

@Massinissa-Mouhoub

@Massinissa-Mouhoub Massinissa-Mouhoub commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

This PR ports flutter/flutter#189345 from flutter/flutter to flutter/packages, as part of flutter/flutter#188444.

Fixes flutter/flutter#189298

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Aug 30, 2026

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request ensures that DatePickerThemeData.todayBorder is respected over todayForegroundColor in the year selector of the date picker. It updates the border color logic in _YearPickerState, updates the documentation, and adds corresponding regression tests. Feedback on the tests suggests correcting a test description that incorrectly references todayBackgroundColor instead of todayForegroundColor.

Comment thread packages/material_ui/test/calendar_date_picker_test.dart Outdated
@elliette elliette changed the title [material_ui] Port flutter/flutter #189345 "Fix todayBorder color being overridden by todayForegroundColor in YearPicker" [material_ui] Fix todayBorder color being overridden by todayForegroundColor in YearPicker Sep 1, 2026
@QuncCccccc

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Because of the volume of PRs we receive, we require that new contributors use our checklist to guide them through critical steps in creating a Flutter PR. This PR's description is missing that checklist, so it is being marked as a Draft.

Please edit the PR description to add the checklist, then ensure that you have completed all of the steps. Once you've done that, please mark the PR as ready for review.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@QuncCccccc
QuncCccccc marked this pull request as draft September 1, 2026 22:01
@Massinissa-Mouhoub

Copy link
Copy Markdown
Contributor Author

It's done, @QuncCccccc please check.

@Massinissa-Mouhoub
Massinissa-Mouhoub marked this pull request as ready for review September 2, 2026 07:56

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request ensures that DatePickerThemeData.todayBorder is respected in the year selector of the date picker, preventing it from being overridden by the foreground color when a custom border color is defined. It also updates the documentation and adds regression tests. The review feedback points out a mismatch in a test name, which incorrectly references todayBackgroundColor instead of todayForegroundColor.

Comment thread packages/material_ui/test/calendar_date_picker_test.dart Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@QuncCccccc QuncCccccc 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.

LGTM! Thank you for porting over the fix!

Comment thread packages/material_ui/test/calendar_date_picker_test.dart Outdated
@QuncCccccc QuncCccccc added the CICD Run CI/CD label Sep 2, 2026
@Massinissa-Mouhoub

Copy link
Copy Markdown
Contributor Author

@dkwingsmt Any thoughts on this PR ?

@dkwingsmt dkwingsmt 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.

LGTM. Thank you!

@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Sep 14, 2026
@dkwingsmt dkwingsmt added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Sep 14, 2026
@auto-submit
auto-submit Bot merged commit 469b97b into flutter:main Sep 14, 2026
13 checks passed
dkwingsmt pushed a commit to dkwingsmt/flutter that referenced this pull request Sep 15, 2026
…r#192809)

flutter/packages@9caa77c...bebbb57

2026-09-15 5684363+tenninebt@users.noreply.github.com
[google_maps_flutter_platform_interface] Add onPointOfInterestTap
support (flutter/packages#12752)
2026-09-14 stuartmorgan@google.com [google_maps_flutter] Adopts new
async/await Swift Pigeon support (flutter/packages#12860)
2026-09-14 109692895+Massinissa-Mouhoub@users.noreply.github.com
[material_ui] Fix `todayBorder` color being overridden by
`todayForegroundColor` in `YearPicker` (flutter/packages#12697)
2026-09-13 engine-flutter-autoroll@skia.org Roll Flutter from
2553f89 to 8b3e8f5 (4 revisions) (flutter/packages#12856)
2026-09-12 stuartmorgan@google.com [google_maps_flutter] Convert
remaining code to Swift (flutter/packages#12768)
2026-09-12 engine-flutter-autoroll@skia.org Roll Flutter from
63b9518 to 2553f89 (62 revisions) (flutter/packages#12855)
2026-09-12 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
d3b14c8 to 9584c67 (15 revisions) (flutter/packages#12854)
2026-09-12 36861262+QuncCccccc@users.noreply.github.com [material_ui]
Update gen_defaults color helper (flutter/packages#12846)
2026-09-11 brunocorona.alcantar@gmail.com [material_ui] Port
flutter/flutter flutter#185475 "Accessibility: Add semanticLabel to MenuAnchor"
(flutter/packages#12806)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@Massinissa-Mouhoub
Massinissa-Mouhoub deleted the port-189345 branch September 26, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CalendarDatePicker: todayBorder color is still overridden by todayForegroundColor in year picker

3 participants