onefinestay / react-daterange-picker

Other
563 stars 208 forks source link

Show/Hide Calendar #112

Closed harrybabu closed 6 years ago

harrybabu commented 8 years ago

Is there an inbuilt method for Show/Hide calendar?

AlanFoster commented 8 years ago

@harrybabu Hi sorry for the belated response; What is your use case? Could you say specifically what parts you want to hide / show?

RusAlex commented 8 years ago

Suppose he @harrybabu meant to show hide picker completely. I also met this, as usually other datepickers has built-in show/hide picker functional.

Does authors think it's not component responsibility ?

ashachakrapani commented 6 years ago

Is there a way/prop to show/hide the component i.e the calendar as a whole?

AlanFoster commented 6 years ago

@ashachakrapani Is this functionality needed within this component library directly, or can you implement it within your own React application?

AlanFoster commented 6 years ago

I've thrown together a quick code code sandbox demonstrating this functionality:

example

The sandbox code can be found here - https://codesandbox.io/s/0xv5m04yql

Let me know if there's any issues :+1:

AlanFoster commented 6 years ago

This example project can now be found within the project's read me file: https://github.com/onefinestay/react-daterange-picker#getting-started

AlanFoster commented 6 years ago

Closing this off, let me know if you're still having difficulties and we can reopen this if need be :+1:

ashachakrapani commented 6 years ago

Thanks Alan, it was a feature I needed for my application. I have pretty much the same implementation in place to toggle the visibility of the component already. I was only wondering if the component itself had an attribute that would handle it.