saeedrahimi / antd-jalali

A wrapper for ant-design date picker and calendar to support Jalali calendar type
https://saeedrahimi.github.io/antd-jalali/
83 stars 36 forks source link

Error calling localized month name formatting after instantiating any controls. #14

Closed mohas closed 3 years ago

mohas commented 3 years ago

After using any control in my react tree calling dayjs().locale('fa').format('MMM') or any other month name formatter will fail. This s because jalaliday adds a jmonth array to dayjs locale object, while you use your own custom locale object, so calling format, jalaliday expects a jmonth array to be available which is not, thus the error.

I will submit a pull request for a quick fix, but in general I think that you should avoid defining your custom locale object and just use the default dayjs one

mohas commented 3 years ago

15 pull request added

saeedrahimi commented 3 years ago

Thank you for your contribution. Feel free to reopen this issue.

Closed by #15