This pull request includes updating package antd version to 5.14.2, which fix compatibility issues with newly refactored <DatePicker /> component as mentioned here: ant-design/ant-design#46982
As I installed antd version 5.14.2, antd-jalali stopped working and this error was thrown:
Compiled with problems:
ERROR in src/jalali/generateJalaliConfig.ts:52:7
TS2739: Type '{ getNow: () => Dayjs; getFixedDate: (string: string) => Dayjs; getEndDate: (date: Dayjs) => Dayjs; getWeekDay: (date: Dayjs) => number; getYear: (date: Dayjs) => number; ... 16 more ...; locale: { ...; }; }' is missing the following properties from type 'GenerateConfig<Dayjs>': getMillisecond, setMillisecond
50 | };
51 |
> 52 | const generateJalaliConfig: GenerateConfig<Dayjs> = {
| ^^^^^^^^^^^^^^^^^^^^
53 | // get
54 | getNow: () => dayjs(),
55 | getFixedDate: (string) => dayjs(string, "YYYY-MM-DD"),
I fixed it by defining the getMillisecond and setMillisecond in generateJalaliConfig, (src/jalali/generateJalaliConfig.ts).
Thanks for your contribution, I just updated the repository, I assume this issue will be also resolved with the latest changes.
Please feel free to reopen this PR. 🙂
This pull request includes updating package
antd
version to5.14.2
, which fix compatibility issues with newly refactored<DatePicker />
component as mentioned here: ant-design/ant-design#46982As I installed
antd
version5.14.2
,antd-jalali
stopped working and this error was thrown:I fixed it by defining the
getMillisecond
andsetMillisecond
ingenerateJalaliConfig
, (src/jalali/generateJalaliConfig.ts
).