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.

It is not possible to close `inline withPortal` picker without changing date

See original GitHub issue

I have case similar to the case ‘Inline portal version’ from samples. I use button to show modal picker.

<DatePicker
    selected={this.state.date}
    onChange={this.handleDateChange}
    withPortal
    inline
/>

When picker is shown, there is no way to close picker without selecting different date. I’m not sure why, because the case with only withPortal (ie. without inline) works as expected (you can click background to close the modal). This can also be seen in demo Portal version.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
alex-shamshurincommented, Apr 24, 2017

That’s why there is another callback - onClickOutside to solve your problem.

0reactions
martinekcommented, Apr 24, 2017

That solves my problem, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React DatePicker how to open datepicker on click of icon
Just wrap DatePicker with label. All click inside label call focus on input, that open calendar. <label> <DatePicker/> </label>.
Read more >
Set Date Picker options Service Portal snDatePicker Directive
Anyone know if it's possible to set any date picker options (minDate & maxDate) for the "sp-date-picker" directive? As I've tried.
Read more >
React Datepicker crafted by HackerOne
A simple and reusable datepicker component for React. Installation. The package can be installed via NPM: npm install react-datepicker --save. Or by using...
Read more >
Change how a date or time is displayed in a date picker, text ...
Browser-compatible form templates do not support the display of the date and time ... If you are working with a text box control...
Read more >
How to Add DatePicker to React JS Application
A date picker, also known as a popup calendar, date and time picker, ... It is not possible to input an incorrect time...
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