Open
Description
Describe the bug
Hi! I have a problem with android time picker.
I use an inline time picker and a 12-hour format.
When I set minimumDate and maximumDate between noon and try to change the "AM/PM" value, I get inappropriate behavior.
The values of the time picker start jumping.
Expected behavior
When I press “AM/PM” and the current value is outside the “minimumDate” and “maximumDate”, the minimum or maximum allowable value should be selected.
export default function App {
const [time, setTime] = useState<Date>(new Date());
const minDate = new Date('2025-01-16T09:00:00.000Z');
const maxDate = new Date('2025-01-16T14:00:00.000Z');
return
<View style={styles.container}>
<DatePicker
locale='en'
date={time}
onDateChange={setTime}
mode='time'
theme='light'
minimumDate={minDate}
maximumDate={maxDate}
timeZoneOffsetInMinutes={0}
/>
</View>
}
Smartphone (please complete the following information):
- OS: Android
- React Native version 0.74.5
- react-native-date-picker version 5.0.4(also tried 5.0.8)
Selected.January.16.2025.15.56.41.mp4
Metadata
Metadata
Assignees
Labels
No labels