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.

Doesn't open on click

See original GitHub issue

So… I’m using it in this way:

import '!style!css!sass!react-dates/css/variables.scss';
import '!style!css!sass!react-dates/css/styles.scss';

function Test() {
  return (
   <DateRangePicker />
  );
}

It get properly rendered but when I click on the fields, the calendars are not shown…why?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

6reactions
majapwcommented, Oct 17, 2016

Hi @FezVrasta! The DateRangePicker is a fully controlled component which means that you need to create a wrapper component that maintains the focused element and selected date in its state and updates those values using the provided onFocusChange and onDatesChange callbacks. You can see an example of the code you’d need for this kind of wrapper component here: https://github.com/airbnb/react-dates/blob/master/examples/DateRangePickerWrapper.jsx

Basically, without this setup, no interactions will work.

1reaction
realisationcommented, Nov 20, 2017

I was simply using it without any wrapper component in my jsx. Inside an enclosing parent div, I had two single date pickers with a span between them. But then I made a wrapper component doing a singledatepicker alone, by itself, in a parent div and it works just fine.

On Mon, Nov 20, 2017 at 7:33 AM, Erin Doyle notifications@github.com wrote:

@realisation https://github.com/realisation can yo provide some code to show? Otherwise it’s hard to say what the problem may be with your approach.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/airbnb/react-dates/issues/126#issuecomment-345682833, or mute the thread https://github.com/notifications/unsubscribe-auth/AM3aGb_6jEFcezkmvtbtcbGWiKXxwH-fks5s4XGPgaJpZM4KX-Hf .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Program Won't Open When You Click On It in Windows 10? 7 ...
Open Settings > Update & Security > Windows Update. If an update is available, it will display in the window to the right....
Read more >
Javascript "onClick" event doesn't work - Stack Overflow
The button is displayed but when it is clicked, nothing happens. The function is located in an external JS file. this is function...
Read more >
5 Solutions if You Can't Click Anything on Windows 10
What to do if I can't click anything in Windows 10? 1. Restart the explorer.exe process. Press Ctrl + Shift + Esc to...
Read more >
Program Exe Won't Open When You Click on It in Windows 10 ...
Program Exe Won't Open When You Click on It in Windows 10/11 FIXWebsite used: https://www.carifred.com/exefixer/If you are not able to open ...
Read more >
Can't Click Anything On Desktop In Windows 10 (Fixed)
This Tutorial Helps to Can't Click Anything On Desktop In Windows 10 (Fixed)00:00 Intro00:09 Method 1 - Restart Windows Explorer00:38 Method ...
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