-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
Theme tokens don't work for generatePicker #40582
Comments
You may look for issues: |
Hello @kembly. Please provide a online reproduction by forking codesandbox of antd@5.x or antd@4.x, or provide a minimal GitHub repository. Issues labeled by 你好 @kembly, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 antd@5.x 或 antd@4.x 的 codesandbox,或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。 |
Hello @afc163! I just reproduced the issue in this sandbox: |
Change |
@MadCcc thanks for the example! doesn't work in my case with dayjs though:
gives me:
I am using NextJs 12.3.4 and antd 5.2.1 |
did you solve this error, i am getting the same error but i couldn't solve it. |
@sorokinvj / @zahirekrem09 Did you found a solution, i'm getting the same error |
Unfortunately, I couldn't find it, but as far as I've told, it seems like an improvement has been made, I don't know when it will be published. |
Yep, problem still there |
`import React from 'react' import { DatePicker } from 'antd' import momentGenerateConfig from 'rc-picker/lib/generate/moment' const HDatePicker = DatePicker.generatePicker(momentGenerateConfig) export default HDatePicker |
My problem was that the theme algorithm wasn't being picked up
and that was due to my imports referring to lib, which I implemented due to this problem so. I changed it back to es, fixed the original issue by adding transpilePackages to my next.config.js, and now everything works I'm on 5.8.4 |
Reproduction link
https://github.com/ant-design/ant-design
Steps to reproduce
colorPrimary
in antd configWhat is expected?
The custom color theme set in the antd config will be adopted by the date picker created from:
generatePicker
.What is actually happening?
The custom color theme is ignored for the
DatePicker
which is created viageneratePicker
The text was updated successfully, but these errors were encountered: