DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architecture
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- android, javascript, react-native
- Área
- mobile
Línea de trabajo
Start by reading the package's Android imperative API export and its New Architecture setup, then reproduce with React Native 0.78.3 in Bridgeless mode using the reported DateTimePickerAndroid.open() call. Trace why the export is undefined and check whether the issue is specific to that architecture. Done means the picker opens and its selection reaches the onChange callback; no test file or implementation entry point is named in the report.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- React Native Version: 0.78.3
- Package Version: @react-native-community/datetimepicker 9.1.0
- Platform: Android
- Device: Android Emulator / Physical Device
- Architecture: New Architecture (Bridgeless mode enabled)
Description
When attempting to open the date picker using the imperative API DateTimePickerAndroid.open(), the app crashes with an undefined property error.
Error Message
Uncaught Error: Cannot read property 'DateTimePickerAndroid' of undefined
Reproduction Steps
- Set up React Native 0.78.3 project with new architecture enabled
- Install @react-native-community/datetimepicker 9.1.0
- Implement date picker as shown below
- Trigger the date picker on Android device
Code Example
import DateTimePicker from '@react-native-community/datetimepicker';
import { Platform } from 'react-native';
export const openDatePicker = ({ value, mode = 'date' }) => {
if (Platform.OS !== 'android') return;
DateTimePickerAndroid.open({
value: value || new Date(),
mode,
is24Hour: true,
});
};
Expected Behavior
- Date picker should open with native Android date/time picker UI
- User should be able to select a date and receive onChange callback
Actual Behavior
- App crashes immediately when attempting to open date picker
DateTimePickerAndroidis undefined
- 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
-
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Todos los issues de react-native-datetimepicker/datetimepicker
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 87/100
OWASP/CheatSheetSeries#2905 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ComposioHQ/composio#5249 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
zilliztech/memsearch#838 ·
Los mantenedores suelen responder en 1 día
-
[DOCS] Nine one-colon directives hide code examples and notes in the reference docs (e.g. CustomJS)AbiertoTRIAGE
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
cdx-audit output written to a pipe is cut off at 64 KiBQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug mode:cli
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día