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

Countdown value type and docs value type mismatched #47905

Closed
AO19 opened this issue Mar 15, 2024 · 2 comments · Fixed by #47907
Closed

Countdown value type and docs value type mismatched #47905

AO19 opened this issue Mar 15, 2024 · 2 comments · Fixed by #47907

Comments

@AO19
Copy link

AO19 commented Mar 15, 2024

Reproduction link

Edit on CodeSandbox

Steps to reproduce

The docs say "value Set target countdown time number | dayjs - "
But the type definitions say something else.

What is expected?

No warnings or errors.

What is actually happening?

I get the warning: Type 'Dayjs' is not assignable to type 'valueType | undefined'.

Environment Info
antd 5.15.2
React 18.2.0
System 14.3.1 (23D60)
Browser Chrome 122.0.6261.112
@afc163
Copy link
Member

afc163 commented Mar 16, 2024

- const deadline = dayjs().add(1, "hour");
+ const deadline = dayjs().add(1, "hour").date();

@afc163
Copy link
Member

afc163 commented Mar 16, 2024

Wrong documentation.

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

Successfully merging a pull request may close this issue.

2 participants