Skip to content

[ui][ios] - Add range and children support in DatePicker#41546

Merged
intergalacticspacehighway merged 7 commits intomainfrom
match-date-picker-with-swift-ui
Dec 11, 2025
Merged

[ui][ios] - Add range and children support in DatePicker#41546
intergalacticspacehighway merged 7 commits intomainfrom
match-date-picker-with-swift-ui

Conversation

@intergalacticspacehighway
Copy link
Copy Markdown
Contributor

@intergalacticspacehighway intergalacticspacehighway commented Dec 11, 2025

Why

Adds range and children support in DatePicker, matches JS API with SwiftUI API and improves the example UI. It will be easier to maintain if we match the JS API to SwiftUI. It is a breaking change similar to what we did with Picker, but the refactor should be quick.

How

  • Add DatePicker component that matching the underlying SwiftUI Component. There is also MultiDatePicker that we can add as a separate component.
  • Adds range (min, max) support for dates
  • Adds children support which can be used to add custom title and subtitle to DatePicker

Test Plan

Added a new example screen in NCL.

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-12-11.at.09.57.33.mov

Checklist

@github-actions
Copy link
Copy Markdown
Contributor

Subscribed to pull request

File Patterns Mentions
packages/expo-ui/** @aleqsio, @behenate, @douglowder

Generated by CodeMention

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Dec 11, 2025
@expo-bot
Copy link
Copy Markdown
Collaborator

expo-bot commented Dec 11, 2025

The Pull Request introduced fingerprint changes against the base commit: 738042d

Fingerprint diff
[
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-ui/ios",
      "reasons": [
        "expoAutolinkingIos"
      ],
      "hash": "8cc342f73b25a8e6f368759e9d09ac3f1ea03e0c"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-ui/ios",
      "reasons": [
        "expoAutolinkingIos"
      ],
      "hash": "d98095a312173fcefb6e4243c343e1b1ffdca269"
    }
  }
]

Generated by PR labeler 🤖


return (
<Host style={{ flex: 1 }}>
<Form modifiers={[animation(Animation.default, animate)]}>
Copy link
Copy Markdown
Contributor Author

@intergalacticspacehighway intergalacticspacehighway Dec 11, 2025

Choose a reason for hiding this comment

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

animation modifier works well for example screens, we can use it when there are layout transitions.

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.

maybe rename as DatePickerScreen.ios.tsx

@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Dec 11, 2025
@intergalacticspacehighway intergalacticspacehighway merged commit 76059fb into main Dec 11, 2025
19 of 20 checks passed
@intergalacticspacehighway intergalacticspacehighway deleted the match-date-picker-with-swift-ui branch December 11, 2025 10:34
intergalacticspacehighway added a commit that referenced this pull request Dec 11, 2025
# Why

Updates docs for DatePicker changes introduced in
#41546
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

Updated generated types data and examples.
<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [ ] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
aleqsio pushed a commit that referenced this pull request Dec 22, 2025
# Why

Adds range and children support in DatePicker, matches JS API with
[SwiftUI
API](https://developer.apple.com/documentation/swiftui/datepicker) and
improves the example UI. It will be easier to maintain if we match the
JS API to SwiftUI. It is a breaking change similar to what we did with
Picker, but the refactor should be quick.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

- Add DatePicker component that matching the underlying SwiftUI
Component. There is also
[MultiDatePicker](https://developer.apple.com/documentation/swiftui/multidatepicker)
that we can add as a separate component.
- Adds range (min, max) support for dates
- Adds [children
support](https://developer.apple.com/documentation/swiftui/datepicker#overview)
which can be used to add custom title and subtitle to DatePicker
<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

Added a new example screen in NCL.


https://github.com/user-attachments/assets/d230e3c8-16de-4a89-9749-c5412aad3b22


<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
aleqsio pushed a commit that referenced this pull request Dec 22, 2025
# Why

Updates docs for DatePicker changes introduced in
#41546
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

Updated generated types data and examples.
<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [ ] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants