IOS and ANDROID onChange Event do not share the same value but have the same type
Personne n'a encore pris cette issue.
- #1064 par @cpruijsen — fermée sans fusion
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 38/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- react-native, typescript
Piste de recherche
The report identifies the DateTimePicker onChange callback type and a mismatch between iOS and Android values, but names no source files or tests. Start by tracing the callback type definitions and platform implementations, then look for existing callback tests. Done when the type reflects the value returned on iOS and the mismatch is covered by a test.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Bug report
Summary
DatePicker onChange value is not the same between IOS and ANDROID but both actually share the same type, leading to TS invalid type when trying to accessing "unexisting" property
Reproducible sample code
<DateTimePicker
value={birthdate}
is24Hour={true}
onChange={(
value: DateTimePickerEvent & {
nativeEvent: { target?: number };
}) => {
if (value.nativeEvent.target) {
// operation on date change
}}
/>
Steps to reproduce
Set a DatePicker component anywhere with anydata and run it on IOS, this was tested with mode "compact"
Describe what you expected to happen:
IOS onChange type should be following the actual data returned
Environment info
EXPO SDK 51.0
System:
OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
Memory: 1.64 GB / 4.81 GB
Shell:
version: 5.8.1
path: /bin/zsh
Binaries:
Node:
version: 20.5.1
path: /usr/bin/node
Yarn:
version: 1.22.22
path: /usr/bin/yarn
npm:
version: 10.8.2
path: /usr/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java:
version: 17.0.12
path: /usr/bin/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.5
wanted: 0.74.5
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
datetimepicker version: 2.7.5
- Langage dominant
- JavaScript
- Étoiles
- 2.9k
- Forks
- 459
- Merge moyen
- 4 j 16 h
- PR mergées (30 j)
- 5
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de react-native-datetimepicker/datetimepicker
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 commentaire ·
Toutes les issues de react-native-datetimepicker/datetimepicker
Issues similaires
-
chore
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
idean3885/claude-ops-agent#910 ·
Les mainteneurs répondent en général sous 1 jour
-
S: triage
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
oskarrough/agent-ide#29 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Add: Trinitas TV LogoOuvertecheck:passed logos:add
Difficulté 1/5 Moins d'une heure Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 4 jours
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
WikiEducationFoundation/WikiEduDashboard#7258 ·
Les mainteneurs répondent en général sous 1 jour