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.

Spinner Doesn't Stay Open

See original GitHub issue

Is there an elegant way to keep the spinner open until the user has clicked MM DD and YYYY? Or keep it open for a set amount of seconds?

Right now current functionality is: when a user scrolls/spins to the month, the picker closes immediately because I am hiding the picker after they set the value which is closing the picker after each input. If I don’t do this then the picker never closes and it is a bad user experience. Is there a timer or a good way to handle only closing the picker after the user has completed all field inputs?

const handleConfirm = (event, date) => {
       handleInput("birthday", date.toLocaleDateString("en-US"));
       hideDatePicker();
    };
 
     const hideDatePicker = () => {
        setShow(!show);
      };

        {show && (
              <DateTimePickerModal
                    testID="dateTimePicker"
                   value={new Date(birthday)}
                    mode="date"
                    display="spinner"
                    onChange={handleConfirm}
                    style={{
                      flex: 1,
                      backgroundColor: Colors.White,
                      marginLeft: -100,
                    }}
              />
        )}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

1reaction
sumitsk1commented, Apr 15, 2021

Is there an elegant way to keep the spinner open until the user has clicked MM DD and YYYY? Or keep it open for a set amount of seconds?

Right now current functionality is: when a user scrolls/spins to the month, the picker closes immediately because I am hiding the picker after they set the value which is closing the picker after each input. If I don’t do this then the picker never closes and it is a bad user experience. Is there a timer or a good way to handle only closing the picker after the user has completed all field inputs?

const handleConfirm = (event, date) => {
       handleInput("birthday", date.toLocaleDateString("en-US"));
       hideDatePicker();
    };
 
     const hideDatePicker = () => {
        setShow(!show);
      };

        {show && (
              <DateTimePickerModal
                    testID="dateTimePicker"
                   value={new Date(birthday)}
                    mode="date"
                    display="spinner"
                    onChange={handleConfirm}
                    style={{
                      flex: 1,
                      backgroundColor: Colors.White,
                      marginLeft: -100,
                    }}
              />
        )}

same issue!! Did you find any solution ??

0reactions
github-actions[bot]commented, Dec 11, 2021

👋 @oporter1, thanks for opening the issue. The issue tracker is intended for tracking bug reports and feature requests only. Seems you have a usage question. Please ask the question on StackOverflow. You can also chat with other community members on Reactiflux Discord server.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a Fidget Spinner That's No Longer Spinning
1. Carefully use a butter knife to remove the cap from the center of the fidget spinner. You also may be able to...
Read more >
How To Fix A Spinner That Does Not Turn – Spreader Repair
Find out why the spinner in your spreader will not move or turn. Use this spreader repair guide to test and replace the...
Read more >
14 Common Spinning Reel Problems (And How To Fix Them)
Spinning Reel Bail Won't Close or Stay Open. The main reason a bail arm is not closing is usually due to a bent...
Read more >
Wind Spinner Troubleshooting - How to Fix
You have not hung up the spinner on something. That is why the system is going back and forth. Heavy blades are very...
Read more >
Having Trouble Getting You Wind Spinner To Spin? Try This
Another reason your wind spinner isn't working? It could be filthy! Over time, most garden spinner decor picks up dirt, grime, and other...
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