Able to edit time in TextInput to non intervals when the minuteInterval is set.

Abierto
#806 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
ios, javascript, react-native
Área
mobile

Línea de trabajo

Start by reading the iOS DateTimePicker implementation and its handling of minuteInterval and TextInputMode; the issue does not name specific files or tests. Check how UIDatePicker's roundsToMinuteInterval option affects keyboard entry, then identify the public API and tests that would need to cover the new boolean parameter. Done means keyboard entry can preserve non-interval minutes while the spinner retains the configured interval.

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

Descripción

Feature request

Hi Team, I've been using minuteInterval set to 15mins in DateTimePicker. But the requirement here is to show the timer picker with 15-minute intervals in the spinner and the user should be able to edit non-15-minute intervals while using the keyboard.
We can achieve this feature on iOS datetimepicker just by making the roundsToMinuteInterval param false.
ref: https://developer.apple.com/documentation/uikit/uidatepicker/3791478-roundstominuteinterval?language=objc

Why it is needed

So after adding minuteInterval={15}, we were able to see the time picker with 15-minute intervals in the spinner but the problem was when we used the keyboard the time would round to the closest 15min closest. The change we want is to prevent the time picker from going back to the closest 15mins interval while using the keyboard I mean when the picker is in TextInputMode the user can enter 15-minute intervals while using the keyboard.

Possible implementation

Adding an extra parameter roundsToMinuteInterva which takes bool as a param.

sample

https://github.com/react-native-datetimepicker/datetimepicker/assets/115147840/b8c84f57-a32d-4490-87cc-49d8d5548cb1

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.