Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type 'Date' is not assignable to type 'Moment' #300

Closed
jnsvu opened this issue Jun 3, 2021 · 4 comments
Closed

Type 'Date' is not assignable to type 'Moment' #300

jnsvu opened this issue Jun 3, 2021 · 4 comments

Comments

@jnsvu
Copy link

jnsvu commented Jun 3, 2021

selectedDate, minDate, maxDate , startingDate props give the above ts error when passing date instead of moment date. According to docs those props should accept dates as well.

@chungweileong94
Copy link
Contributor

@sniib Yes, it accepts both Moment & Date.
As for now, my temporary workaround is to use the patch-package to patch the type.

@peacechen
Copy link
Collaborator

@chungweileong94 Did you patch the TS definition? Please submit a PR with the fixes.

@chungweileong94
Copy link
Contributor

@peacechen Just create a PR for that.
#301

@peacechen
Copy link
Collaborator

Fix published in 2.2.3. Thanks for the PR @chungweileong94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants