Setting timeZoneName doesn't seem to affect the datetimepicker
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- android, javascript, react-native
- Domaine
- mobile
Piste de recherche
The report uses DateTimePickerAndroid.open with timeZoneName and minimumDate on Android 11; it names no source files or tests. Start by reading the Android implementation and existing timezone tests, then trace how the selected date and minimum date are interpreted. Done means the displayed day and disabled dates follow the requested timezone; the issue has had no comment for 757 days, so check whether maintainers still need the report.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Please see this:
I temporarily set the phone's timezone in such a way that the date is still the day before as compared to the current day in AU (+11:00, Australia/Sydney tz).
Then I open the DateTimePicker like this:
DateTimePickerAndroid.open({
value: variableToUse,
minimumDate,
timeZoneName: "Australia/Sydney",
onChange: (ev, newDate) => {
if (ev.type === 'set') {
if(onChangeDateFn) onChangeDateFn(newDate)
}
}
})
However, upon opening the Datepicker, it still highlights the previous day as if setting timeZoneName to Australia/Sydney did not have any effect:
Is this intentional? My expectation is that it should now follow +11:00 timezone, and as such, the current day should be February 12, not February 11.
I cannot select it anymore though. that means the minimumDate props is working, but it should be greyed out as well, like the previous days before it.
I'm using:
Expo: 50.0.6
@react-native-community/datetimepicker: 7.6.2
Android: 11
- 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
-
Build produces empty forge.min.js: package.json lists "forge" instead of "node-forge"Peut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Fei2411/DeepSeek-Bot#963 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Miaotofu01/Study-Mate#244 ·
Les mainteneurs répondent en général sous 1 jour
-
test-reliability
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Azure/azure-sdk-for-js#40672 · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
txn2/mcp-data-platform#2492 ·
Les mainteneurs répondent en général sous 1 jour