Setting timeZoneName doesn't seem to affect the datetimepicker

Abierto
#859 9 comentarios 7 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
android, javascript, react-native
Área
mobile

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
JavaScript
Estrellas
2.9k
Forks
459
Merge medio
4 d 16 h
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de react-native-datetimepicker/datetimepicker

Todos los issues de react-native-datetimepicker/datetimepicker

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.