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

MonthView locale 'ar-lb' showing in numbers instead of numerals #508

Closed
yschoueri opened this issue Apr 16, 2021 · 10 comments
Closed

MonthView locale 'ar-lb' showing in numbers instead of numerals #508

yschoueri opened this issue Apr 16, 2021 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@yschoueri
Copy link

I am using react-calendar 3.3.1 with my own styling and when my locale is 'ar-lb', in the month view, the days are shown in numbers instead of arabic numerals whereas in the year view, it is correctly shown in numerals. I couldn't find a function formatDays similar to all the other format prop methods provided.

Month view vs Year view

image

@wojtekmaj
Copy link
Owner

wojtekmaj commented Apr 16, 2021

Oh that's an interesting one!

Pardon my ignorance, does that look correct to you?

obraz

@wojtekmaj wojtekmaj added the bug Something isn't working label Apr 16, 2021
@wojtekmaj wojtekmaj self-assigned this Apr 16, 2021
@yschoueri
Copy link
Author

Yes that's more like it :)

@wojtekmaj
Copy link
Owner

wojtekmaj commented Apr 16, 2021

Released with v3.4.0. You now have locale-aware day number formatting as well as formatDay custom prop functin available.

Maintaining this project has been so educating!

@yschoueri
Copy link
Author

yschoueri commented Apr 16, 2021

Thank you so much for your quick response! It's a really great project, lightweight, simple to use, easily customizable!

@wojtekmaj
Copy link
Owner

Thanks! Consider sponsoring the project, or convincing your employer to do so!

@yschoueri
Copy link
Author

Quick question, when would the v3.4.0 release be available on npm?

@wojtekmaj
Copy link
Owner

It should already be, maybe it was just a hiccup?

Taku-Yamashita added a commit to Taku-Yamashita/DefinitelyTyped that referenced this issue Apr 24, 2021
Since the formatDay argument has been available since v3.4.0, I propose the type.
wojtekmaj/react-calendar#508
@manoj7594
Copy link

Hi All,

I am using the react-calendar version '3.7.0'. I want to render calendar with arabic numerals. I tried to give locale as 'ar-EG'. It is displaying correctly. But, when I tried to give locale as 'ar-AE' the numbers are not arabic.

image

image

@wojtekmaj . Can you please help me.

@wojtekmaj
Copy link
Owner

@yschoueri Number formatting is done based on Intl implementation in your browser. Looks like all browser vendors form some reason decided ar-AE should result in numbers returned. There's nothing I can do on my side.

@manoj7594
Copy link

@wojtekmaj Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants