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
- Lift the selected year state from
CalendarPicker to an Onyx key.
- Create a new
@react-navigation modal route for year selection.
- Extract
YearPickerModal content into a standalone screen component that writes the selected year to Onyx.
- Update
CalendarPicker to read from Onyx instead of local state for the year.
- 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 Owner
Current Issue Owner: @trasnake87
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
YearPickerModalanimates in from right-to-left like a regular screen, but usesreact-native-modalinternally. This causes inconsistent animations compared to standard@react-navigationscreens on native.Migration approach (Group 2 — Lift local
useStateto Onyx)src/components/DatePicker/CalendarPicker/YearPickerModal.tsxCalendarPicker/index.tsxonYearChange(option.value)→ updatescurrentDateViewstate inCalendarPickercurrentDateViewyear component fromCalendarPicker→ a shared Onyx key.CalendarPickeris embedded inDatePickerModalandScheduleCallPageand owns complex month/year/day state, making this the trickiest in Group 2.Steps
CalendarPickerto an Onyx key.@react-navigationmodal route for year selection.YearPickerModalcontent into a standalone screen component that writes the selected year to Onyx.CalendarPickerto read from Onyx instead of local state for the year.DatePicker(date of birth, IOURequestStepDate, SetDatePage, etc.) on iOS, Android, and web.Reference
@react-navigation#53493Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @trasnake87