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

Date input improvements #7639

Merged
merged 4 commits into from
Feb 3, 2025
Merged

Date input improvements #7639

merged 4 commits into from
Feb 3, 2025

Conversation

mozzius
Copy link
Member

@mozzius mozzius commented Feb 3, 2025

This PR introduces several changes related to the date input:

  1. (Motivating this) adds a maximumDate field to DateField. Prevents entering a birthdate in the future
  2. Changes the birthday input to use the new DateField. Results in nested dialogs on iOS, but otherwise much cleaner
  3. Allows passing Date objects to DateField. Previously, it was the responsibility of the parent to stringify values to YYYY-MM-DD, but we can just accept both and run the util inside the component
  4. Now that it's no longer in use, we can delete the legacy date input
Simulator.Screen.Recording.-.iPhone.16.-.2025-02-03.at.13.58.49.mp4

Test plan

Test that the date inputs still work (birthday in settings, and signup form)
Test that you can no longer enter a date in the future
Check on all platforms, since implementation is forked significantly

Copy link

github-actions bot commented Feb 3, 2025

Old size New size Diff
7 MB 6.99 MB -1.35 KB (-0.02%)

Copy link
Member

@estrattonbailey estrattonbailey left a comment

Choose a reason for hiding this comment

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

LGTM! There are some comments in here about input/output formats. Mind updating those? Pry only need to note what the changed value format is, or whatever you feel is clearest 👍

@arcalinea arcalinea temporarily deployed to samuel/date-input-improvements - social-app PR #7639 February 3, 2025 20:19 — with Render Destroyed
@mozzius
Copy link
Member Author

mozzius commented Feb 3, 2025

Didn't see that - can do!

@mozzius mozzius merged commit 23e62b1 into main Feb 3, 2025
7 checks passed
@mozzius mozzius deleted the samuel/date-input-improvements branch February 3, 2025 20:28
estrattonbailey added a commit that referenced this pull request Feb 5, 2025
* origin/main: (100 commits)
  Adding webp to regex list. Added function return type for consistency with the rest of the functions (#7649)
  bump version (#7650)
  use did for userID (#7647)
  Upgrade RN to 0.76.6 (#7557)
  Update expo-blur (#7596)
  Fix slow Hosting Provider dialog (#7594)
  make convo menu lazy (#7604)
  Fix convo header loading state (#7603)
  Spring cleaning (#7640)
  Date input improvements (#7639)
  Add example account store (#7641)
  rm refs in render (#7589)
  change search cancel behaviour (#7624)
  reduce padding on video overlay (#7617)
  Typo fix (#7637)
  no follow self (#7606)
  env var tweaks (#7457)
  Test fix
  Add Danish localization (#7220)
  Add Swedish localization (#7232)
  ...
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.

3 participants