aboveyunhai / chakra-dayzed-datepicker

Chakra UI + Dayzed = datepicker
https://aboveyunhai.github.io/chakra-dayzed-datepicker/
MIT License
223 stars 46 forks source link

How to automatically close Popover after select endDate on RangeDatepicker #25

Closed biko8 closed 1 year ago

biko8 commented 1 year ago

In advance, thanks for the component! Its awesome! 👍

There is some method to close automatically the Popover when user selects the endDate on RangeDatepicker?

aboveyunhai commented 1 year ago

I don't think so. I personally have weird feeling about the user-prefer behavior. It seems like some prefer to have a confirm button inside the panel, some prefer the button to be outside, and also the auto close like you mentioned. That's why I want to do #16 so you can write your own input wrapper, meanwhile we can still create our own input wrapper for the simple usage. Then the question will become how much the Calendar Component should cover, if it's only a little, then why not dev just install dayzed by themselves without installing this package.

biko8 commented 1 year ago

Its true. I understand you. But I think is a good idea to have all the possibilities. Its very good idea to allow developers to write their own input wrapper. And also can be a good idea to have new config like "closeOnSelect: boolean". (This seems much easy to implement, and allows developers to have it implemented quickly, without rewrite nothing."

But I'm agree with you, that if developers implement their own input wrapper, can implement that.

Thanks for the work in these components! 👍

aboveyunhai commented 1 year ago

pretty fair. Let me find a time to add that feature.

aboveyunhai commented 1 year ago

Solved by #35