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] Option for abbreviated or wide for month view #11546

Closed
fakhamatia opened this issue Jan 2, 2024 · 4 comments
Closed

[pickers] Option for abbreviated or wide for month view #11546

fakhamatia opened this issue Jan 2, 2024 · 4 comments
Labels
component: pickers This is the name of the generic UI component, not the React module!

Comments

@fakhamatia
Copy link
Contributor

fakhamatia commented Jan 2, 2024

Summary 💡

I want to show full month name in month view, not abbreviated.
I'm using 6.16.0 but cant find this option in doc and source.

Examples 🌈

No response

Motivation 🔦

No response

Search keywords: abbreviated month

@fakhamatia fakhamatia added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 2, 2024
@michelengelen
Copy link
Member

Please provide a minimal reproduction test case with the latest version. This would help a lot 👷.

A live example would be perfect. This codesandbox.io template may be a good starting point. You can find more codesandbox templates in our docs.

Thank you! 🙇🏼

@michelengelen michelengelen added status: waiting for author Issue with insufficient information component: pickers This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 2, 2024
@LukasTy
Copy link
Member

LukasTy commented Jan 2, 2024

Hello @fakhamatia, have you tried overriding the dateFormats on LocalizationProvider?
There is a monthShort format that is currently only used on the MonthCalendar.
That is not the most proper solution long-term, but one that should work for now, until we provide more extensibility in this regard.

<LocalizationProvider
  dateAdapter={AdapterDayjs}
  dateFormats={{
    monthShort: 'MMMM',
  }}
>

@fakhamatia
Copy link
Contributor Author

Hello @fakhamatia, have you tried overriding the dateFormats on LocalizationProvider? There is a monthShort format that is currently only used on the MonthCalendar. That is not the most proper solution long-term, but one that should work for now, until we provide more extensibility in this regard.

<LocalizationProvider
  dateAdapter={AdapterDayjs}
  dateFormats={{
    monthShort: 'MMMM',
  }}
>

Yes, it works perfectly!

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Jan 2, 2024
@LukasTy
Copy link
Member

LukasTy commented Jan 3, 2024

I'm glad to hear that it solves your problem. 🙌
I'm closing this issue as we have an open issue (#10874) to introduce more slots for year and month calendars. 😉

@LukasTy LukasTy closed this as completed Jan 3, 2024
@LukasTy LukasTy removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 3, 2024
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!
Projects
None yet
Development

No branches or pull requests

3 participants