IOS and ANDROID onChange Event do not share the same value but have the same type
Nessuno ha ancora preso questa issue.
- #1064 di @cpruijsen — chiusa senza merge
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- react-native, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- JavaScript
- Stelle
- 2.9k
- Fork
- 459
- Merge medio
- 4g 16h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react-native-datetimepicker/datetimepicker
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 commento ·
Tutte le issue di react-native-datetimepicker/datetimepicker
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Fei-Away/Codex-Dream-Skin#449 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
outline/outline#14489 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Claude Code plugin does not wire the edit-time Floor hookForse già presa @dgr8akki l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Administration: required plugin configuration field stays invalid after restoring its saved valueApertaneeds-triage Platform(Default)
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno