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

locale is not a consistent #900

Open
me6iaton opened this issue May 11, 2020 · 4 comments
Open

locale is not a consistent #900

me6iaton opened this issue May 11, 2020 · 4 comments

Comments

@me6iaton
Copy link

me6iaton commented May 11, 2020

monthsShort: (dayjsInstance, format) => {

locale is not uniform format for different languages.
due to the fact that in ru locale months and monthsShort not simple arrays of strings
https://ant.design/components/date-picker/ does not fully supported ru locale , see
https://github.com/react-component/picker/blob/e7403734d8cde9c9403ae00c83c4da34625ede57/src/generate/dayjs.ts#L90

I propose to add monthStandalone and monthShortStandalone props to locale
and make a choice in a separate function

@iamkun
Copy link
Owner

iamkun commented May 14, 2020

@iamkun
Copy link
Owner

iamkun commented May 14, 2020

You can now get correct locale part via: dayjs().localeData().month() or localeObject.month.s

@me6iaton
Copy link
Author

this does not correct the situation when ru locale format is different from all others, but it is better than nothing, thanks!

@iamkun
Copy link
Owner

iamkun commented May 15, 2020

That's because ru locale has two different formats of string in different situations.

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

2 participants