Skip to content

Added calendar delegate to support custom calendar systems #161874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 70 commits into from
Mar 8, 2025

Conversation

sarbagyastha
Copy link
Contributor

@sarbagyastha sarbagyastha commented Jan 19, 2025

Added CalendarDelegate class that supports plugging in custom calendar logics other than Gregorian Calendar System.

Here is an example implementation for Nepali(Bikram Sambat) Calendar System: https://github.com/sarbagyastha/nepali_date_picker/blob/m3/lib/src/nepali_calendar_delegate.dart

Demo using the NepaliDatePickerDelegate: https://date.sarbagyastha.com.np/

Fixes #77531, #161873

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jan 19, 2025
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@sarbagyastha
Copy link
Contributor Author

It seems that the Google testing is currently encountering some infra errors, which is affecting many other PRs. Let's wait for a day or two and I'll update this PR with the main branch when the infra recovers.

Ok @dkwingsmt , thank you 😊

@dkwingsmt dkwingsmt added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 8, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Mar 8, 2025
Merged via the queue into flutter:master with commit 6d6d791 Mar 8, 2025
75 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 10, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Mar 10, 2025
flutter/flutter@6b93cf9...b16430b

2025-03-10 jonahwilliams@google.com [macOS] Enable Impeller by default on macOS. (flutter/flutter#164572)
2025-03-10 engine-flutter-autoroll@skia.org Roll Packages from 4c5a7ed to 464cea5 (5 revisions) (flutter/flutter#164904)
2025-03-10 engine-flutter-autoroll@skia.org Roll Skia from f17d37ee0ac6 to 4ac86f17f2d4 (1 revision) (flutter/flutter#164893)
2025-03-10 engine-flutter-autoroll@skia.org Roll Skia from 0f53870c7449 to f17d37ee0ac6 (1 revision) (flutter/flutter#164887)
2025-03-09 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 6tAcm4hdtXPE55GJP... to U-zlyIZrZRbr9I6gv... (flutter/flutter#164868)
2025-03-09 engine-flutter-autoroll@skia.org Roll Skia from 345dc2d05dcd to 0f53870c7449 (1 revision) (flutter/flutter#164865)
2025-03-08 engine-flutter-autoroll@skia.org Roll Skia from 916caa2f0102 to 345dc2d05dcd (1 revision) (flutter/flutter#164843)
2025-03-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from ixl5bKWCqsRiYGvps... to 6tAcm4hdtXPE55GJP... (flutter/flutter#164838)
2025-03-08 engine-flutter-autoroll@skia.org Roll Skia from b29851b2ada6 to 916caa2f0102 (1 revision) (flutter/flutter#164835)
2025-03-08 jonahwilliams@google.com [Impeller] add capability check for extended range formats. (flutter/flutter#164817)
2025-03-08 sarbagyastha@gmail.com Added calendar delegate to support custom calendar systems (flutter/flutter#161874)
2025-03-08 dkwingsmt@users.noreply.github.com RoundSuperellipse algorithm v3: Ultrawideband heuristic formula (flutter/flutter#164755)
2025-03-08 43054281+camsim99@users.noreply.github.com Merge CHANGELOG for 3.29.1 stable release  (flutter/flutter#164743)
2025-03-08 matanlurey@users.noreply.github.com Add and link to `Infra-Triage.md`. (flutter/flutter#164673)
2025-03-07 engine-flutter-autoroll@skia.org Roll Skia from cbc7e99d6c2f to b29851b2ada6 (10 revisions) (flutter/flutter#164812)
2025-03-07 jonahwilliams@google.com [Impeller] dont redundantly set stencil reference on vulkan backend. (flutter/flutter#164763)
2025-03-07 codefu@google.com content-aware-hash experiment update (flutter/flutter#164803)
2025-03-07 21270878+elliette@users.noreply.github.com [Widget Inspector] Handle null exceptions calling `renderObject` (flutter/flutter#163642)
2025-03-07 jason-simmons@users.noreply.github.com Use Python 3.12 to run the yapf formatter if no lower version is available (flutter/flutter#164807)
2025-03-07 chris@bracken.jp Roll gn to 7a8aa3a08a13521336853a28c46537ec04338a2d (flutter/flutter#164806)
2025-03-07 jason-simmons@users.noreply.github.com [Impeller] Store the TextureGLES cached framebuffer object as a reactor handle (flutter/flutter#164761)

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

To file a bug in Packages: 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 21, 2025
This PR fixes an issue where the `calendarDelegate` parameter was not
respected by `showDateRangePicker`. Although support
for`calendarDelegate` was added in [PR
#161874](#161874), it was
inadvertently omitted from `showDateRangePicker`, causing
inconsistencies in behavior compared to `showDatePicker`.

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
flutter/flutter@6b93cf9...b16430b

2025-03-10 jonahwilliams@google.com [macOS] Enable Impeller by default on macOS. (flutter/flutter#164572)
2025-03-10 engine-flutter-autoroll@skia.org Roll Packages from 4c5a7ed to 464cea5 (5 revisions) (flutter/flutter#164904)
2025-03-10 engine-flutter-autoroll@skia.org Roll Skia from f17d37ee0ac6 to 4ac86f17f2d4 (1 revision) (flutter/flutter#164893)
2025-03-10 engine-flutter-autoroll@skia.org Roll Skia from 0f53870c7449 to f17d37ee0ac6 (1 revision) (flutter/flutter#164887)
2025-03-09 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 6tAcm4hdtXPE55GJP... to U-zlyIZrZRbr9I6gv... (flutter/flutter#164868)
2025-03-09 engine-flutter-autoroll@skia.org Roll Skia from 345dc2d05dcd to 0f53870c7449 (1 revision) (flutter/flutter#164865)
2025-03-08 engine-flutter-autoroll@skia.org Roll Skia from 916caa2f0102 to 345dc2d05dcd (1 revision) (flutter/flutter#164843)
2025-03-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from ixl5bKWCqsRiYGvps... to 6tAcm4hdtXPE55GJP... (flutter/flutter#164838)
2025-03-08 engine-flutter-autoroll@skia.org Roll Skia from b29851b2ada6 to 916caa2f0102 (1 revision) (flutter/flutter#164835)
2025-03-08 jonahwilliams@google.com [Impeller] add capability check for extended range formats. (flutter/flutter#164817)
2025-03-08 sarbagyastha@gmail.com Added calendar delegate to support custom calendar systems (flutter/flutter#161874)
2025-03-08 dkwingsmt@users.noreply.github.com RoundSuperellipse algorithm v3: Ultrawideband heuristic formula (flutter/flutter#164755)
2025-03-08 43054281+camsim99@users.noreply.github.com Merge CHANGELOG for 3.29.1 stable release  (flutter/flutter#164743)
2025-03-08 matanlurey@users.noreply.github.com Add and link to `Infra-Triage.md`. (flutter/flutter#164673)
2025-03-07 engine-flutter-autoroll@skia.org Roll Skia from cbc7e99d6c2f to b29851b2ada6 (10 revisions) (flutter/flutter#164812)
2025-03-07 jonahwilliams@google.com [Impeller] dont redundantly set stencil reference on vulkan backend. (flutter/flutter#164763)
2025-03-07 codefu@google.com content-aware-hash experiment update (flutter/flutter#164803)
2025-03-07 21270878+elliette@users.noreply.github.com [Widget Inspector] Handle null exceptions calling `renderObject` (flutter/flutter#163642)
2025-03-07 jason-simmons@users.noreply.github.com Use Python 3.12 to run the yapf formatter if no lower version is available (flutter/flutter#164807)
2025-03-07 chris@bracken.jp Roll gn to 7a8aa3a08a13521336853a28c46537ec04338a2d (flutter/flutter#164806)
2025-03-07 jason-simmons@users.noreply.github.com [Impeller] Store the TextureGLES cached framebuffer object as a reactor handle (flutter/flutter#164761)

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

To file a bug in Packages: 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
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
flutter/flutter@6b93cf9...b16430b

2025-03-10 jonahwilliams@google.com [macOS] Enable Impeller by default on macOS. (flutter/flutter#164572)
2025-03-10 engine-flutter-autoroll@skia.org Roll Packages from 4c5a7ed to 464cea5 (5 revisions) (flutter/flutter#164904)
2025-03-10 engine-flutter-autoroll@skia.org Roll Skia from f17d37ee0ac6 to 4ac86f17f2d4 (1 revision) (flutter/flutter#164893)
2025-03-10 engine-flutter-autoroll@skia.org Roll Skia from 0f53870c7449 to f17d37ee0ac6 (1 revision) (flutter/flutter#164887)
2025-03-09 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 6tAcm4hdtXPE55GJP... to U-zlyIZrZRbr9I6gv... (flutter/flutter#164868)
2025-03-09 engine-flutter-autoroll@skia.org Roll Skia from 345dc2d05dcd to 0f53870c7449 (1 revision) (flutter/flutter#164865)
2025-03-08 engine-flutter-autoroll@skia.org Roll Skia from 916caa2f0102 to 345dc2d05dcd (1 revision) (flutter/flutter#164843)
2025-03-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from ixl5bKWCqsRiYGvps... to 6tAcm4hdtXPE55GJP... (flutter/flutter#164838)
2025-03-08 engine-flutter-autoroll@skia.org Roll Skia from b29851b2ada6 to 916caa2f0102 (1 revision) (flutter/flutter#164835)
2025-03-08 jonahwilliams@google.com [Impeller] add capability check for extended range formats. (flutter/flutter#164817)
2025-03-08 sarbagyastha@gmail.com Added calendar delegate to support custom calendar systems (flutter/flutter#161874)
2025-03-08 dkwingsmt@users.noreply.github.com RoundSuperellipse algorithm v3: Ultrawideband heuristic formula (flutter/flutter#164755)
2025-03-08 43054281+camsim99@users.noreply.github.com Merge CHANGELOG for 3.29.1 stable release  (flutter/flutter#164743)
2025-03-08 matanlurey@users.noreply.github.com Add and link to `Infra-Triage.md`. (flutter/flutter#164673)
2025-03-07 engine-flutter-autoroll@skia.org Roll Skia from cbc7e99d6c2f to b29851b2ada6 (10 revisions) (flutter/flutter#164812)
2025-03-07 jonahwilliams@google.com [Impeller] dont redundantly set stencil reference on vulkan backend. (flutter/flutter#164763)
2025-03-07 codefu@google.com content-aware-hash experiment update (flutter/flutter#164803)
2025-03-07 21270878+elliette@users.noreply.github.com [Widget Inspector] Handle null exceptions calling `renderObject` (flutter/flutter#163642)
2025-03-07 jason-simmons@users.noreply.github.com Use Python 3.12 to run the yapf formatter if no lower version is available (flutter/flutter#164807)
2025-03-07 chris@bracken.jp Roll gn to 7a8aa3a08a13521336853a28c46537ec04338a2d (flutter/flutter#164806)
2025-03-07 jason-simmons@users.noreply.github.com [Impeller] Store the TextureGLES cached framebuffer object as a reactor handle (flutter/flutter#164761)

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

To file a bug in Packages: 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom (non gregorian) calendar in showDatePicker
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy