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

[pickers] Day of the week title (PickersCalendarDayHeader) is forced to truncate to the first char #5541

Closed
rajdee opened this issue Jul 19, 2022 · 4 comments
Labels
component: pickers This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists new feature New feature or request

Comments

@rajdee
Copy link

rajdee commented Jul 19, 2022

Current behavior 😯

The titles of the days of the week in the DayPicker are truncated to the first character, regardless of what the localized helper getWeekdays returns.

children: day.charAt(0).toUpperCase()

Expected behavior 🤔

I propose to add an option to disable truncating of days titles or the ability to pass a custom PickersCalendarDayHeader component

@rajdee rajdee added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 19, 2022
@rajdee rajdee changed the title Day of the week title (PickersCalendarDayHeader) is forced to truncate to the first char [pickers] Day of the week title (PickersCalendarDayHeader) is forced to truncate to the first char Jul 19, 2022
@DanailH
Copy link
Member

DanailH commented Jul 20, 2022

Hi, @rajdee thanks for raising this. This seems like a relevant request. I'm tagging @flaviendelangle or @alexfauquette to take a look when they have some time.

@DanailH DanailH added new feature New feature or request component: pickers This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 20, 2022
@flaviendelangle
Copy link
Member

Related to #5330

Duplicates #4605

@flaviendelangle flaviendelangle added duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 20, 2022
@rajdee
Copy link
Author

rajdee commented Jul 20, 2022

@flaviendelangle I agree that the ticket is similar to #5530 but #4605 has no solutions at the moment, because day.charAt(0).toUpperCase() is hardcoded

I extended the date-fns adapter with getWeekdays but that doesn't make sense because output week day is truncated. Therefore, I suggested adding an option to disable truncating or add the ability to pass a custom PickersCalendarDayHeader component

@flaviendelangle
Copy link
Member

Therefore, I suggested adding an option to disable truncating or add the ability to pass a custom PickersCalendarDayHeader component

Which is basically what #4605 is talking about, which is why I closed this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants