Skip to content

fix(android): align timeZoneName native spec types - #1074

Open
pemalama12 wants to merge 1 commit into
react-native-datetimepicker:masterfrom
pemalama12:fix/android-time-zone-name-specs
Open

pemalama12 wants to merge 1 commit into
react-native-datetimepicker:masterfrom
pemalama12:fix/android-time-zone-name-specs

Conversation

@pemalama12

Copy link
Copy Markdown

Summary

Correct the Android TurboModule timeZoneName contract: use an optional string in the two date-picker specs and add it to the two time-picker specs. This matches the public Flow/TypeScript API and Common.getTimeZone(), which reads an IANA timezone name with getString().

Test Plan

  • yarn test --runInBand: 31 tests and 3 snapshots pass.
  • yarn lint: 0 errors, 22 existing warnings.
  • React Native 0.83.3 Codegen: all four fields become optional strings; the rest of the combined schema is unchanged.
  • All native code generators succeed. Generated Android Java output is unchanged.
  • Device/simulator builds were not run locally; native CI validation is pending.

Compatibility

Android spec correction. Public props and picker UI retain their existing API.

Checklist

  • Updated all four affected Flow specs.
  • Ran Jest, lint and Codegen validation.
  • Tested on a device and simulator.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the Android TurboModule timeZoneName spec changes.

No open issues 🎉

What changed in this PR

Aligns Android TurboModule timeZoneName specs with the public Flow/TypeScript API and native string handling, without changing public props or picker UI.

Changes:

  • Corrects timeZoneName from an optional number to an optional string in both date-picker specs.
  • Adds optional string timeZoneName fields to both time-picker specs.
File Description
src/​specs/​NativeModuleTimePicker.js Adds optional string timeZoneName.
src/​specs/​NativeModuleMaterialTimePicker.js Adds optional string timeZoneName for Material time pickers.
src/​specs/​NativeModuleMaterialDatePicker.js Corrects Material date-picker timeZoneName to a string.
src/​specs/​NativeModuleDatePicker.js Corrects date-picker timeZoneName to a string.

Review effort: Balanced

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.

2 participants