# Feature Request: Expose scrolling events (`onScrollStart` / `onScrollEnd`) or `onScrollingChange` for DateTimePicker
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react-native
- Ambito
- mobile
Direzione di ricerca
Start by reading the DateTimePicker component and its native iOS, Android, and Windows picker implementations to see where scrolling state can be observed and exposed. The issue proposes either start/end callbacks or a boolean callback but gives no file or test names. Done means host apps can detect when the wheel is scrolling and disable actions until it settles.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature request
Summary
When the native wheel picker is scrolling, host UIs (e.g., a BottomSheet with action buttons) cannot detect that the wheel is still moving. This may cause users to press Confirm while the wheel is still decelerating, resulting in an incorrect or unintended selection.
I’m requesting new APIs to expose the picker’s scroll state, such as:
onScrollStart/onScrollEndcallbacks, or- a single
onScrollingChange(isScrolling: boolean)callback.
This would allow the host to temporarily disable buttons during scrolling to provide a smoother and safer UX.
Why it is needed
- Prevent accidental confirmation while the wheel is settling.
- Improve UX in modals and BottomSheets where confirm/cancel actions sit below the picker.
- Current APIs (
onChange) only fire after a value has fully settled — not while scrolling.
Proposed API
Option A — Separate callbacks
<DateTimePicker
value={value}
mode="time"
onChange={handleChange}
onScrollStart={() => setPickerScrolling(true)}
onScrollEnd={() => setPickerScrolling(false)}
/>
Option B — Single boolean callback
<DateTimePicker
value={value}
onScrollingChange={(isScrolling) => setPickerScrolling(isScrolling)}
/>
Code sample
function BottomSheet() {
const [value, setValue] = useState(new Date());
const [scrolling, setScrolling] = useState(false);
return (
<>
<DateTimePicker
mode="time"
value={value}
onChange={(event, newValue) => setValue(newValue)}
onScrollStart={() => setScrolling(true)}
onScrollEnd={() => setScrolling(false)}
/>
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<Button title="Cancel" disabled={scrolling} />
<Button title="Confirm" disabled={scrolling} />
</View>
</>
);
}
- Lingua principale
- JavaScript
- Stelle
- 2.9k
- Fork
- 459
- Merge medio
- 4g 16h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react-native-datetimepicker/datetimepicker
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 commento ·
Tutte le issue di react-native-datetimepicker/datetimepicker
Issue simili
-
Build produces empty forge.min.js: package.json lists "forge" instead of "node-forge"Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Fei2411/DeepSeek-Bot#963 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Miaotofu01/Study-Mate#244 ·
I maintainer di solito rispondono entro 1 giorno
-
test-reliability
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Azure/azure-sdk-for-js#40672 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
txn2/mcp-data-platform#2492 ·
I maintainer di solito rispondono entro 1 giorno