Skip to content
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

Material 3 pickers #952

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

sidorchukandrew
Copy link

@sidorchukandrew sidorchukandrew commented Dec 13, 2024

Summary

Add Material 3 date and time pickers for Android. Material 3 has been out for some time now and these new pickers would provide developers with more modern interfaces for their apps.

Test Plan

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)
  • I have added automated tests, either in JS or e2e tests, as applicable

TODO

I'm not sure how many of these need to be implemented to merge this PR.

  • Support min and max dates
  • Support fullscreen dialogs
  • Custom firstDayOfWeek
    - [ ] Better theming support
    - [ ] Custom date validations
    - [ ] Expo plugin support

Android Studio recommended these settings for supporting
Kotlin in the project.
@sidorchukandrew sidorchukandrew force-pushed the material-3-pickers branch 3 times, most recently from 4f58cb1 to 22f3d0e Compare December 16, 2024 16:13
@sidorchukandrew sidorchukandrew marked this pull request as ready for review December 16, 2024 18:28
@sidorchukandrew sidorchukandrew force-pushed the material-3-pickers branch 5 times, most recently from 432884f to ac33d0d Compare December 17, 2024 21:37
The new Material pickers will utilize these utilities as well.
@sidorchukandrew sidorchukandrew force-pushed the material-3-pickers branch 4 times, most recently from 5db9b03 to 55767b5 Compare December 18, 2024 15:13
The pickers will allow the user to set a title for the dialog
and specify if the initial input mode should be a text input or
calendar/clock.
This also adds a utility function to RNDate to get the date in
milliseconds.
@sidorchukandrew sidorchukandrew force-pushed the material-3-pickers branch 2 times, most recently from e8a96a6 to 89dfccb Compare December 18, 2024 15:23
If the `design` is "material", then use the Material modules.
Otherwise, use the default modules.
The tests were trying to access the native modules. These dummy
files will make sure the tests don't try accessing the real
implementations that end with `.android.js`.
Since there are multiple "default" options on the screen now,
I've specified to tap the first one. I also had to make sure to
scroll the screen before tapping the show picker button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant