Skip to content

[Due for payment 2026-07-24] [$250] Migrate YearPickerModal to @react-navigation modal screen #90469

Description

@mountiny

Context

This is a sub-issue of #53493 (Replace modal screens with modals from @react-navigation).

For full background and migration approach, see the triage analysis comment and the sub-issue breakdown comment.

Problem

YearPickerModal animates in from right-to-left like a regular screen, but uses react-native-modal internally. This causes inconsistent animations compared to standard @react-navigation screens on native.

Migration approach (Group 2 — Lift local useState to Onyx)

  • File: src/components/DatePicker/CalendarPicker/YearPickerModal.tsx
  • Used by: Only CalendarPicker/index.tsx
  • On select: onYearChange(option.value) → updates currentDateView state in CalendarPicker
  • State to lift: The currentDateView year component from CalendarPicker → a shared Onyx key.
  • Note: CalendarPicker is embedded in DatePickerModal and ScheduleCallPage and owns complex month/year/day state, making this the trickiest in Group 2.

Steps

  1. Lift the selected year state from CalendarPicker to an Onyx key.
  2. Create a new @react-navigation modal route for year selection.
  3. Extract YearPickerModal content into a standalone screen component that writes the selected year to Onyx.
  4. Update CalendarPicker to read from Onyx instead of local state for the year.
  5. Test all flows that use DatePicker (date of birth, IOURequestStepDate, SetDatePage, etc.) on iOS, Android, and web.

Reference

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022054512616348356516
  • Upwork Job ID: 2054512616348356516
  • Last Price Increase: 2026-05-13
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorTask

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions