IOS and ANDROID onChange Event do not share the same value but have the same type
Nadie ha tomado este issue todavía.
- #1064 de @cpruijsen — cerrado sin fusionar
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- react-native, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- JavaScript
- Estrellas
- 2.9k
- Forks
- 459
- Merge medio
- 4 d 16 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de react-native-datetimepicker/datetimepicker
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 comentario ·
Todos los issues de react-native-datetimepicker/datetimepicker
Issues similares
-
Administration: required plugin configuration field stays invalid after restoring its saved valueAbiertoneeds-triage Platform(Default)
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
nearform/ag-grid-url-sync#314 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
idean3885/claude-ops-agent#910 ·
Los mantenedores suelen responder en 1 día
-
S: triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
oskarrough/agent-ide#29 · 1 comentario ·
Los mantenedores suelen responder en 1 día