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

Add the ability to customize weekday names #675

Open
1 task done
GitGraf opened this issue Nov 14, 2024 · 0 comments
Open
1 task done

Add the ability to customize weekday names #675

GitGraf opened this issue Nov 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@GitGraf
Copy link

GitGraf commented Nov 14, 2024

Before you start - checklist

  • I have checked if this feature request is not already reported

Description

Hello! I noticed that, when I open the calendar with the pt-PT locale, the names of the weekdays are not abbreviated. As the available screen space in my application is limited, this causes the names to get cut-off.
datepicker_pt

I understand that this the intended behavior (as the standard JS Date#toLocaleDateString with { weekday: 'short' } also does not abbreviate), but I think it would be cool to have the ability to customize them.

Proposed solution

It looks like the react-calendar project already exposes some options for customizing the weekdays, but I don't see a way to do this using only the react-date-picker dependency.

https://github.com/wojtekmaj/react-calendar/blob/main/packages/react-calendar/src/Calendar.tsx props contains a formatShortWeekday function.

Alternatives

No response

Additional information

No response

@GitGraf GitGraf added the enhancement New feature or request label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant