Setting timeZoneName doesn't seem to affect the datetimepicker

Aperta
#859 9 commenti 7 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
android, javascript, react-native
Ambito
mobile

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Please see this:
image
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:

image

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

Lingua principale
JavaScript
Stelle
2.9k
Fork
459
Merge medio
4g 16h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di react-native-datetimepicker/datetimepicker

Tutte le issue di react-native-datetimepicker/datetimepicker

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.