Closed tonypingco closed 1 year ago
you just need to convert the between date
and string
via date-fns
(since it's one of dependency of this lib) by yourself before you make any api request, or change the data type before saving into your redux.
It's just one extra line of code. This is quite normal for general applications.
Hi,
I am using the library to my app and looking to save date state to Redux, to connect with the backend server as for now we are using Redux for this kind of task. The normal date and setDate setter would work at normal use case but when it comes to Redux, I guess the payload mostly return string type, so the onDateChange function is not working as it needs a Date type.
Here is my code:
Issue:
onDateChange
not works with Redux and string type.