I am using react-native-modal-datetime-picker
for a time picker. I want to change the minute interval to be 15 minutes instead of 1 minute. Is this possible? Thanks!
Asked
Active
Viewed 2,507 times
3

SomoKRoceS
- 2,934
- 2
- 19
- 30
1 Answers
10
Following the docs, there is a property called minuteInterval
which gets a number (defaults as 1) and can change the interval of the minutes input.
Use it like this:
render() {
return (
<>
<DateTimePicker
minuteInterval={15}
/>
</>
);
}

SomoKRoceS
- 2,934
- 2
- 19
- 30
-
1Thanks! You answered so fast i cant even accept it yet haha! – Aug 12 '20 at 21:06
-
For some reason the prop does seem to work for me. The version linked is an older version. The newer version does not include this prop it seems? https://www.npmjs.com/package/react-native-modal-datetime-picker – bg9848 Aug 18 '20 at 14:59
-
They noted that "all the @react-native-community/react-native-datetimepicker props are also supported!", So it should work on the newer version as well. – SomoKRoceS Aug 18 '20 at 15:39