minuteInterval is not working in 'time' mode
See original GitHub issueHello, I am using the time picker but the minuteInterval is not working for me both on default and spinner displays.
const [isTimePickerVisible, setIsTimePickerVisible] = useState(false);
const [minuteInterval, setMinuteInterval] = useState(5);
{isTimePickerVisible && (
<DateTimePicker
mode="time"
value={new Date()}
is24Hour={true}
minuteInterval={minuteInterval}
display='default'
onChange={(event, date) => {
setIsTimePickerVisible(false);
if (date != undefined) {
let hours = date.getHours();
let minutes = date.getMinutes();
//const seconds = time.getSeconds();
if(hours<7 || hours > 16 || (hours === 16 && minutes !== 0))
{
wrongWorkingHoursAlert();
}
else{
if (hours.toString().length !== 2) hours = "0" + hours;
if (minutes.toString().length !== 2)
minutes = "0" + minutes;
setTimeString(hours + ":" + minutes);
}
}
}}
/>
)}
Would like to know if I am doing somthing wrong since I do not see any report about this issue. Thanks.
Using Expo RN Version: 0.62.2 OS: Android emulator and phone ( not checked on ios yet ) Library version: 2.6.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
minuteInterval is not working in 'time' mode · Issue #238 - GitHub
Hello, I am using the time picker but the minuteInterval is not working for me both on default and spinner displays. const ...
Read more >Setting CupertinoDatePicker minuteInterval: throws an ...
So to make it work properly as it is now I did add it and initialized it wit DateTime.now() with minutes at 0...
Read more >GE, 15119 24-Hour Indoor Basic Timer, 1 Polarized Outlet ...
This ItemGE, 15119 24-Hour Indoor Basic Timer, 1 Polarized Outlet, Plug-In, Daily On/Off Cycle, 30 Minute Interval, for Lamps, Seasonal Appliances, and Portable ......
Read more >Operation Guide 2499/3092 - Support
Changing the Timekeeping Mode setting screen during a 5-minute interval between snooze alarms stops the current snooze alarm operation (but snooze alarm remains....
Read more >How Does Looping Work? - GoPro Support
Looping will overwrite footage from the same recording but not those ... Looping set to a 20 minute interval will divide your video...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The latest version in the expo is
2.4.3
according this PR and the implementation of the feature is in the2.5.0
according the CHANGELOG need to update thedatetimepicker
in the expo to the latest version@spyshower yes, your edit is correct. We cannot control values that can be selected, so we correct the value after selection.
if this does not work for someone, please open a new issue according to the template, thanks