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

Ouverte
#806 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
48/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
ios, javascript, react-native
Domaine
mobile

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
JavaScript
Étoiles
2.9k
Forks
459
Merge moyen
4 j 16 h
PR mergées (30 j)
5

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de react-native-datetimepicker/datetimepicker

Toutes les issues de react-native-datetimepicker/datetimepicker

Issues similaires

Plus d'issues JavaScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.