Closed naodya closed 2 years ago
The
date
prop always expect aDate
, ideally it should work if date is not supplied.
You can simply provide your own default date={new Date()}
If you just want it to work without useState
hook, it means I will have to encapsulate the date
state for you. Then it will be difficult for user to use date
state outside of the component. For example, use it inside Formik
, the state hook leaves a lot of flexibility to user.
Actually, that's the primary reason why I create the lib at that moment.
I'm actually rolling out the date range picker due to the project need. So idk something might change.
The
date
prop always expect aDate
, ideally it should work if date is not supplied.