farhoudshapouran/react-native-ui-datepicker

Scrolling Issue on Time Picker

Closed this issue · 2 comments

Summarized code:

import { Dropdown } from 'react-native-element-dropdown';
export default function App() {
    const [eventDate, setEventDate] = useState();
    return (
        <ScrollView>
            <View style={styles.container}>
                <View>
                    <Text>Date of Event: {eventDate}</Text>
                    <DateTimePicker
                        date={eventDate}
                        timePicker
                        todayContainerStyle={{
                            borderWidth: 1,
                        }}
                        onChange={params => setEventDate(params.date)}
                    />
            </View>
        </ScrollView>
    );
}

Concern:

  1. I selected a date
  2. Clicked on the time
  3. Time picker view shows up
  4. When I try to scroll up or down to select the time, the app registers as me scrolling the entire app view up or down, while time picker itself is lagging.

I suspect the component isn't designed to ignore ScrollView by default, is this an expected behavior?

Please upgrade to the latest version I changed the time picker component. e7d9364

Sorry to bother, but are you sure this problem has been solved? I'm having this issue too.

Nevermind, it was a problem with NativeBase, as I was using your component inside a modal, which already has a ScrollView by default