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] Update calendar header to MD3 with separate year and month buttons #9124

Open
2 tasks done
heshamwhite opened this issue May 26, 2023 · 5 comments
Open
2 tasks done
Labels
component: pickers This is the name of the generic UI component, not the React module! design: material you design This is about UI or UX design, please involve a designer enhancement This is not a bug, nor a new feature

Comments

@heshamwhite
Copy link

heshamwhite commented May 26, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

Using the StaticDateTimePicker, in "Calendar Header", there are a button with the month and year label and previous and next month buttons.

I find it unintuitive that when clicking the month and year button (circled in red in screenshot) , the year view comes up. And in order to pick another month, one have to use the next button to go through all months until the intended month is reached.
image

In order to get the months view to appear, I have to remove the years view altogether. However, the years view is still needed in my use case.

Examples 🌈

Here is the code of the screenshot provided above.Sandbox

Motivation 🔦

It would be nice to have an option to change the behavior of this button to show the months view instead of the years view. I tried to rewrite the view through the slots property, but I was unsuccessful.
Would it be possible to provide this functionality or a possible workaround?

Order ID 💳 (optional)

No response

@heshamwhite heshamwhite added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 26, 2023
@oliviertassinari oliviertassinari added the component: pickers This is the name of the generic UI component, not the React module! label May 26, 2023
@LukasTy
Copy link
Member

LukasTy commented May 26, 2023

It would be nice to have an option to change the behavior of this button to show the months view instead of the years view

Could you clarify your expected behavior?

  • Do you wish for the month view to be opened first when clicking on this button? In which case, specifying views={['month', 'year', 'day']} should do the trick
  • Would you like a different experience for switching between the available views?

@LukasTy LukasTy added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 26, 2023
@LukasTy LukasTy changed the title Year/Month button behavior in DateTimePicker Header [pickers] Year/Month button behavior in DateTimePicker Header May 26, 2023
@heshamwhite
Copy link
Author

@LukasTy sure.

For this specific button(the red circled one), I don’t want to show the years view at all, only the months view and skip the years view.

If the user want to change the year, they can click on the year button at the very top under “SELECT DATE & TIME“

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label May 26, 2023
@LukasTy
Copy link
Member

LukasTy commented May 29, 2023

If the user want to change the year, they can click on the year button at the very top under “SELECT DATE & TIME“

This part couldn't be the default, because the toolbar will not necessarily will be visible in everyone's cases, because its visibility can be controlled.

For this specific button(the red circled one), I don’t want to show the years view at all, only the months view and skip the years view.

This looks like a very specific requirement, especially given the current state of the header. There is no option to currently achieve your desired result, but feel free to follow #7784. It should allow providing a custom header, where you could provide a custom experience. 👌

As for an out-of-the-box solution leaning closer towards your suggestion—we'll need to focus on bringing the pickers' design more in line with the MD3 suggestion and possibly provide separate triggers to open years and month views switching.
Would that cover your use case as well? 🤔

@nanaynaomi
Copy link

As for an out-of-the-box solution leaning closer towards your suggestion—we'll need to focus on bringing the pickers' design more in line with the MD3 suggestion and possibly provide separate triggers to open years and month views switching.
Would that cover your use case as well? 🤔

Hello @LukasTy - I am wondering if this case is still going to be added where we have the option of separate month and year picker buttons out-of-the-box? This would be very useful for us.

@LukasTy LukasTy added enhancement This is not a bug, nor a new feature design This is about UI or UX design, please involve a designer design: material you labels Nov 6, 2024
@LukasTy LukasTy changed the title [pickers] Year/Month button behavior in DateTimePicker Header [pickers] Update calendar header to MD3 with separate year and month buttons Nov 6, 2024
@LukasTy
Copy link
Member

LukasTy commented Nov 6, 2024

@nanaynaomi Yes, that is still on our agenda. 😉
I have updated the issue title to reflect the relation with MD3 and put the issue into grooming.
Don't expect a quick resolution, though, as we have higher-priority issues/topics to resolve. 🙈

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! design: material you design This is about UI or UX design, please involve a designer enhancement This is not a bug, nor a new feature
Projects
None yet
Development

No branches or pull requests

4 participants