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

Aperta
#806 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ios, javascript, react-native
Ambito
mobile

Direzione di ricerca

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.

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

Descrizione

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

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.