question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

minuteInterval always resetting to 1

See original GitHub issue

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
peterboyercommented, Nov 15, 2018

@mmazzarolo I figured out a workaround!

This problem only exists when the mode is set to "time". If you use “datetime” the minuteInterval prop is respected as expected. However, I only want time!

Instead of controlling the visibility of the DateTimePicker through passing the prop isVisible from a value such as that stored in the state, instead I set the picker component to being always isVisible = true, and then controlling visibility through conditionally rendering the component as such:

{!!pickerVisible && (
  <DateTimePicker
    isVisible
    mode="time"
    date={pickerDate}
    minuteInterval={10}
    onConfirm={pickerOnConfirm}
    onCancel={pickerOnCancel}
  />
)}

Seems to do the job for me!

0reactions
mmazzarolocommented, Apr 20, 2019

Thanks @jordan-thenumber . I’m closing the issue since it’s a DatePicker IOS native problem on which we don’t have control on 😕 It should be fixed by this RN PR soon though!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10 Screen Saver wait time keeps resetting to 1 minute
I have to reset the wait time to anything other than 1 minute before the screen saver starts working. BUT after powering down...
Read more >
c# - How to reset an incrementing counter every N minutes
1 ) Save the current time whenever you reset the timer or when the code will be executed first time: var lastReset =...
Read more >
Interval Timer 1 Minute - YouTube
Looking for a simple interval timer for you exercises? This one here that I made runs for 30 minutes, beeps every 60 seconds,...
Read more >
How to Activate or Deactivate Light Features Using the Multi ...
Repeat the procedure and the light will blink twice, resetting the timer to 2-1/2 minutes. Repeat again for a 3-1/2 minute interval, etc.,...
Read more >
Why Does My Modem Keep Resetting? [Solved]
Are you frustrated with a modem that keeps resetting and rebooting ... 1. Modem Overworking. Issue: Well, all work and no play can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found