aboveyunhai / chakra-dayzed-datepicker

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

the default state for range picker. #5

Open aboveyunhai opened 2 years ago

aboveyunhai commented 2 years ago

I made an immature decision to let the range state as an array [startDate, endDate], this will cause some issues when doing state management.

My original intent is to have a empty object if user don't provide their own:

{
  startDate: undefined, 
  endDate: undefined
}

but it will break range usage from previous versions.

david-morris commented 2 years ago

I like this. It's more explicit. Caret ranges won't auto-increment "minor" versions before 1.0, (link) so it shouldn't cause users a problem until they explicitly update, as long as this is done with a "minor" change (such as 0.22 to 0.23) rather than "patch" change (such as 0.22.0 to 0.22.1).