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 close popover after choosing date/range dates? #24

Closed bielas closed 1 year ago

aboveyunhai commented 1 year ago

click the input again or outside of the panel. Do you have any specific use case where you can't do either way.

pavel-lens commented 1 year ago

@aboveyunhai use case - you want to select range - select 1st date (keep open), select 2nd date - close now, as the selection is complete. I consider this a default behaviour for for range selection, so I would implement a prop keepOpen: boolean to allow people who want to overwrite the behaviour. Does this make sense?

aboveyunhai commented 1 year ago

@aboveyunhai use case - you want to select range - select 1st date (keep open), select 2nd date - close now, as the selection is complete. I consider this a default behaviour for for range selection, so I would implement a prop keepOpen: boolean to allow people who want to overwrite the behaviour. Does this make sense?

make sense, let me take a look at it. basically an close on select for range picker, so the behavior keeps consistent with the single date picker