aboveyunhai / chakra-dayzed-datepicker

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

Allow date to be undefined. #4

Closed jcdogo closed 2 years ago

jcdogo commented 2 years ago

This fix allows undefined dates to be used without causing an error. For my use case I don't want to initialize the date to today's date. I want the user to select the date and the field should be initially blank. This fixes #2.

The changes are pretty straightforward. It doesn't require you to encapsulate the date state or make any other changes. It should work for your use case as well as mine.

aboveyunhai commented 2 years ago

Thanks for the PR. Very reasonable scenario.

aboveyunhai commented 2 years ago

@jcdogo npm 0.1.5 is updated now.

jcdogo commented 2 years ago

Thank you very much for your prompt response!