React-day-picker: Datepicker doesn't hide on outside click when using custom overlay

Created on 18 Oct 2018  路  7Comments  路  Source: gpbl/react-day-picker

Try it here:
http://react-day-picker.js.org/examples/input-custom-overlay

  • Click on the textbox to open the datepicker
  • Click on arrow-right (to go to the next month)
  • click outside the datepicker
  • it doesn't close (only when selecting a date)

Same problem occurs when using a custom navbar

Most helpful comment

Hi there! I ran into the same issue when providing a custom input component to the DayPickerInput component.

@matthova Thanks for looking closer into this, I can see you tried a couple of implementations.

Are there any plans to address this issue? What about known workarounds? In my opinion, this is quite a serious problem as I can imagine a considerable amount of users will want to provide their own input or overlay components.

All 7 comments

Ran into the same problem. Going to do a bit of digging to see if I can find out why, but let me know if you've found a workaround

As described in #871 I'm not sure how to patch the bug while maintaining standard behavior.
Instead I'm going to create a fork where showOverlay is driven by props.

Here's a working implementation by driving showOverlay state from props: https://github.com/gpbl/react-day-picker/pull/872

Hi there! I ran into the same issue when providing a custom input component to the DayPickerInput component.

@matthova Thanks for looking closer into this, I can see you tried a couple of implementations.

Are there any plans to address this issue? What about known workarounds? In my opinion, this is quite a serious problem as I can imagine a considerable amount of users will want to provide their own input or overlay components.

@TSilviu the custom implementation shown in the examples in #872 has been working great for us.

Is this fixed ? @matthova I tried your custom example but its not working for me, any insights on this ? Also I am using this with formik

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thebuilder picture thebuilder  路  3Comments

brpontes picture brpontes  路  6Comments

laidinidis picture laidinidis  路  6Comments

LucasBassetti picture LucasBassetti  路  3Comments

NikitaSasin picture NikitaSasin  路  5Comments